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

Web application and xml data storage, Web application and XML data storage ...

Web application and XML data storage One person should create a library (Java package of classes) for managing the list of bibliography entries, and for saving and loading th

Program of addition of byte type variables – c# program, Program of additio...

Program of addition of byte type variables - C# Program Program of addition of byte type variables, i need program code for performing addition of byte type variables. Can any

Photohandler add-on to display file names, PhotoHandler add-on to display f...

PhotoHandler add-on to display file names Project Description: I want a website with a photo gallery using PhotoHandler. I need the code added/ modified to display the image

Shadowing, What is shadowing? When 2 elements in a program have similar...

What is shadowing? When 2 elements in a program have similar name, one of them can hide and shadow the one. Therefore in such cases the element which shadowed the main element

Explain synchronous postback and asynchronous postback, What is the differe...

What is the difference among synchronous postback and asynchronous postback? The difference between synchronous and asynchronous postback is as follows: Asynchronous postbac

Construct a .net wrapper for a c++, Construct a .NET wrapper for a C++ Dll ...

Construct a .NET wrapper for a C++ Dll - repost Project Description: We have a classic VC++ Dll (source code of DLL not required) that requires a .NET wrapper built by you. U

Data set and data reader, What is difference between data set and data read...

What is difference between data set and data reader? Some major differences between dataset and datareader are as folows :- 1) The DataReader gives forward-only and read-onl

Operator overloading in .net, What is Operator Overloading in .NET? It ...

What is Operator Overloading in .NET? It gives a way to define and use operators like +, -, and / for user-defined classes or structs. It permits us to define/redefine the way

Flexible in rapidly moving from project to project, This is a whole time co...

This is a whole time contractual role working for a sports advisory service. We are data insights consultancy specializing in sports. We consult to a number of sporting organizatio

I need to have my PHP script print a SQL table in reverse , I have the work...

I have the working code I''m using to print the SQL table right now. I just need code to print in reverse order.

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