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

Which command-line tool generates code and mapping, Which command-line tool...

Which command-line tool generates code and mapping for the LINQ to SQL component of .NET Framework? The SqlMetal.exe command-line tool generates code and map the LINQ to SQL co

Define assembly-types of assembly, Assembly: 1) Assembly is a unit of d...

Assembly: 1) Assembly is a unit of deployment such as EXE or a DLL. 2) An assembly consists one or more files (dlls, exe's, html files etc.),& represents a group of resources,

Need help to answer questions of vb.net, Project Description: Need help ...

Project Description: Need help to answer questions of VB.NET Skills required are .NET, Software Development, C# Programming, Visual Basic, Windows Desktop

Online media agency, Our company is seeking a talented PHP Developer to joi...

Our company is seeking a talented PHP Developer to join our young and dynamic online media agency. Must have: - Knowledge in SQL and Databases, proven indexing and coding exp

Tsql function sql server 2012, TSQL Function SQL Server 2012 Project Des...

TSQL Function SQL Server 2012 Project Description: I require someone to prepare a TSQL function that returns the name of the ODBC DSN. I will use the queries below, to get

For loop, create a table using class file

create a table using class file

How many types of assemblies are, How many types of assemblies are there? ...

How many types of assemblies are there? Private, Public/Shared, Satellite. A private assembly is normally used by a one application, and is stored in the application's director

Create and populate a checkboxlist control, Question: (a) The ObjectDa...

Question: (a) The ObjectDataSource control is an alternative design approach to using AccessDataSource or SqlDataSource controls. Explain and illustrate how an ObjectDataSourc

Resource files, What are resource files? The Resource files are the fil...

What are resource files? The Resource files are the files which contain program resources. Many programmers think that resource files are used only for storing strings. But you

What are assemblies, What are Assemblies? Assembly is a single deployab...

What are Assemblies? Assembly is a single deployable unit that have information about the implementation of classes, structures and interfaces. It also keeps the information ab

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