Using ActiveX control in .NET application
How to use activex control in .NET application
Using ActiveX control in .NET application
ActiveX control is a special type Com component that supports a User Interface. Using ActiveX Control in .Net Project is even easier than using COM component. They are bundled usually in .ocx files. Again a proxy assembly is made by .Net utility AxImp.exe which your application (or client) uses as if it is a .Net control or assembly.
Making Proxy Assembly for ActiveX Control:
First, a proxy assembly is made using AxImp.exe (acronym for ActiveX Import) by writing following command on
Command Prompt:
C :> AxImp C: MyProjectsMyControl.ocx
This command will make two dlls
e.g., in case of above command
MyControl.dll
AxMyControl.dll
The first file MyControl.dll is a .Net assembly proxy, which allows you to reference the ActiveX as if it were non-graphical object.
The second file AxMyControl.dll is the Windows Control, which allows u to use the graphical aspects of activex control
Adding Reference of ActiveX Proxy Assembly in your Project Settings:
To add a reference of ActiveX Proxy Assembly in our Project, do this:
1 Select Project Reference (Select Add Reference from Project Menu).
This will show you a dialog box, select .Net tab from the top of window.
Click Browse button on the top right of window.
Select the dll file for your ActiveX Proxy Assembly (which is MyControl.dll) and click OK
2 your selected component is now shown in the Selected Component List Box. Click OK again
