O'Reilly logo

Visual Basic 2008 Recipes: A Problem-Solution Approach by Rakesh Rajan, Matthew MacDonald, Allen Jones, Todd Herman

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

13.9. Use an ActiveX Control in a .NET Client

Problem

You need to place an ActiveX control on a form or a user control in a .NET Framework application.

Solution

Use an RCW exactly as you would with an ordinary COM component (see recipe 13-6). To work with the ActiveX control at design time, add it to the Visual Studio 2008 Toolbox.

How It Works

As with COM components, the .NET Framework fully supports the use of ActiveX controls. When working with COM (detailed in recipe 13-6), an RCW is required to allow communication between your code and the COM object. An ActiveX control differs in that it requires two RCWs. The first RCW provides communication between the COM object and the second RCW. The second RCW is required to communicate between the ...

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