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
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Mahesh ChandRank #1 · 393.4K pointsPosted Oct 21, 2005, 6:12 AM EDT
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.