Thursday, July 5, 2007

Host ActiveX controls in Managed World

   Recently I embarked into the exercise of hosting some ActiveX controls inside of a windows form. Found out that  AxImp.exe was the way to go. Its a neat tool using which you can create a wrapper for the ActiveX control as a dll or as a C# file. After you create the wrapper for the ActiveX control as a C# file (emitted as a Winform user control that derives from AxHost), you can add attributes on the control to make it appear in toolbox. I tried this to host the Outlook List View control in a winform. Works like a charm :) More details on the usage of the tool can be found here.