Share via


On using Windows Forms controls as ActiveX controls

[Update: Reformatted and edited the quote below]

Here is a great summary by Mark Boulter (Tech Lead on .NET Client Team):

To summarize our official position on using Windows Forms controls as ActiveX controls: 

  • v1.0 of Windows Forms only supports using Windows Forms controls in Windows Forms and IE 5.x
  • In v1.1 of the Framework we extended our hosting support to include using Windows Forms controls in MFC 7.x and up or any container that is fully compatible with the MFC 7.x ActiveX control container.
  • However we do not support registration of Windows Forms controls as ActiveX controls and we do not support CoCreateInstance of Windows Forms controls. We only support managed activation of the Windows Forms controls. Once the controls are created they can be hosted in MFC just as you would any other ActiveX control. This article by Chris Sells explains how to do this.