Importing ActiveX Controls

To use an ActiveX Control in your managed application, you must first add the control to the tool palette. This will create both an interop assembly, and an ActiveX assembly with a wrapper class derived from System.Windows.Forms.AxHost. The ActiveX wrapper assembly will be named AxInterop.LibraryName.dll, where LibraryName is the name of the type library. Dragging the control from the palette onto a Windows Form will automatically add references to both assemblies to your project.

Once on your form, the ActiveX Control can be treated as any other .NET component. You can select the control, and set its properties and event handlers in the Object Inspector. The ActiveX Control wrapper will expose the properties of the Windows.Forms.Control class, while properties exposed by the ActiveX Control will be grouped under the Misc category.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment