How to build an ActiveX control in C#
Hi!
I´m currently writing an usercontrol in .Net and using it in vb6.
This works fine if I register it as a COM interop.
I can create an instance of the control in runtime and add it to the vb6 form using the VBControlExtender
However, I can´t add the component to the component tab in vb6 since it´s not an ActiveX control.
I wonder if it is possible to compile a class library as an ActiveX component in C#?
Any help is appreciated.
Mikael
Mahesh ChandPosted Oct 21, 2005, 10:12 AM
You need to export your managed library to COM library using DllExport. See DllExport option for more details or search www.c-sharpcorner.com or google. DllExport converts a C# (.NET) class libraty to a COM library, which can easily be used from VB 6.
There is no concept of ActiveX in C#/.NET.