O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interop with ActiveX Controls

An ActiveX control relies on COM to be activated, modified, have its properties invoked, and so on. Using tlbimp on an ActiveX control doesn't work well. The aximp utility calls tlbimp and creates an appropriate interop assembly; in addition, it creates a second interop assembly that specifically deals with the properties of the ActiveX component.

After you have the interop assemblies, you can reference them in the build and create classes that implement the desired interfaces. For an ActiveX component, you can set the properties and add them to the controls for the form. You can do all of this by hand, but it's not necessary.

This sample used an ActiveX control that was developed by Brent Rector as part of the book ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required