How to use activex control in .net, DOT NET Programming

Assignment Help:

How to use ActiveX Control in .Net ?

ActiveX control is a special type of COM component  that supports a User Interface. Using

ActiveX Control in your .Net Project is even simpler than using COM component. They are bundled usually in .ocx files. Again a proxy assembly is made by .Net utility AxImp.exe (which we will see shortly) 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 permits u to use the graphical aspects of activex control and use it in the Windows Form Project.

  • Adding Reference of ActiveX Proxy Assembly in your Project Settings: To add a reference of ActiveX Proxy Assembly in our Project, do this:

o Select Project Reference... (Select Add Reference from Project Menu).

o This will show you a dialog box, select .Net tab from the top of window.

o Click Browse... button on the top right of window.

o Select the dll file for your ActiveX Proxy Assembly (which is MyControl.dll) and click OK

o Your selected component is now shown in the 'Selected Component' List Box. Click OK again

Some More On Using COM or ActiveX in .Net

  • .Net only gives wrapper class or proxy assembly (Runtime Callable Wrapper or RCW) for COM or activeX control. In the background, it is actually delegating the tasks to the original COM, so it does not change your COM/activeX but just imports them.

 


Related Discussions:- How to use activex control in .net

Function points, What are function points? The FPA is breaking huge sys...

What are function points? The FPA is breaking huge systems into smaller pieces and analyzing them. The Software application is a combination of set of elementary processes. The

What is difference between system.string, What is difference between System...

What is difference between System.String and System.StringBuilder classes? String and StringBuilder classes are used to store string values but the dissimilarity in them is tha

Powershell, how to replace a keyword using powershell

how to replace a keyword using powershell

Import columns of data into data table for data grid view, Import Columns o...

Import Columns of Data into Data Table for Data Grid View in C# and WPF Need help with a project in C# / WPF. Trying to read a csv file or text file with columns of data that wi

We need asp.net expert with simple html, We need Asp.net expert with simple...

We need Asp.net expert with simple html I am in search of a long term asp.net developer to build as well as maintain a volleyball player management website. We would like to inc

What is the meaning of object pooling, What is the meaning of object poolin...

What is the meaning of object pooling? Object pooling is a method of storing a pool (group) of objects in memory that can be reused later as needed. Whenever, a new object is n

Project spending, Is spending in projects constant throughout the project? ...

Is spending in projects constant throughout the project? Generally in initial stage of projects (design and requirement phase) the cost is very less (as you require maximum bus

Develop shop and veterinarian online, Among the items that are related to t...

Among the items that are related to the implementation of an application for automation of processes, are shown as follows: a) The online patient registry through which patients

I want to develop a windows 8.1 application, I want to develop a Windows 8....

I want to develop a Windows 8.1 Application Project Description: Media Player App Development for Windows 8.1 platform with brilliant UI, flexible controls and easy to use.

App to evaluate if a street address fits within a specified, Project Descri...

Project Description: Take a CSV of Canadian street addresses. For every address, translate the address into a GPS coordinate. Use the GPS coordinate to test whether or not the a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd