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

Sorting 2 arrays & merging into 1 - c# program, Sorting 2 Arrays & Merging ...

Sorting 2 Arrays & Merging into 1 - C# Program Hello, i didn't find the correct way to implement Array in my project. I am beginner for this language.  Please suggest me some

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

Name the proxy file to use a web service., Mention the name of the director...

Mention the name of the directory where it is essential to locate the proxy file to use a Web service. The proxy file must be kept in the /bin directory. This directory is situ

I need c# aac sound receiver over wcf, I need C# AAC sound receiver over WC...

I need C# AAC sound receiver over WCF Project Description: I want a WCF method which is able to receive a byte stream of an AAC sound file from iPhone device and save it on t

Satellite assemblies, What are satellite assemblies? We use resource fi...

What are satellite assemblies? We use resource files to store data according to the localized languages. But when you actually go for the deployment you will not like to also i

Triple constraint traingle, What is triple constraint triangle?   ...

What is triple constraint triangle?   Figure: -Project Management Triangle The Project Management triangle is depicted as Cost, Schedule & scope. These 3 aspects for

Microsoft application blocks, Have you ever worked with Microsoft Applicati...

Have you ever worked with Microsoft Application Blocks, if yes then which? The Application Blocks are C# & the VB.NET classes distributed as the Visual Studio projects which ca

.net sender for whatsap, Project Description: We require.NET ( C#.Net or...

Project Description: We require.NET ( C#.Net or VB.Net ) application to send whatsapp message : - The application could be connected to SQL server database to fetch the conta

Explain the concept of exceptions in .net environment, VB. Net & XML 1....

VB. Net & XML 1. Design a form based applications using labels, text boxes, and buttons to perform basic arithmetic operations on integers. 2. Explain the concept of Excepti

I need very easy project in metatrader, I need very easy project in metatra...

I need very easy project in metatrader Project Description: I have 3 indicators.... ADX, emas crossover and macd crossover! They are all signals, arrows! But i would like to

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