Skip to content

How to build an ActiveX control in C#

Mikael Håkansson

Asked Oct 20, 2005, 4:20 AM EDT1 answer
Share
LinkedInX
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 Chand
    0

    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.

    0