Visual C # How to Use the Active X component

Source: Internet
Author: User
Visual C # How to Use the Active X component Author: Ma Jinhu Source: The author agrees to repost it from the computer world Edit responsibility:

3. UnmanagedCodeConvert the Active X component of to the class library of the managed code:

The. NET Framework provides a conversionProgramThis program can be used to convert a non-managed code to a managed code. The program name is “tlbimp.exe. You can use the following command to complete the conversion:

Tlbimp mydll. dll/out: My. dll

A "My. DLL class library, which defines a namespace as "my" and defines a class "class1" in this namespace ", this class has a method called "show.

4. Use the Active X component compiled into the managed code:

In fact, this is not very accurate, because the Active X component cannot be managed code. At this time, the Active X component has become a class library that can be used by the. NET development language. This is mainly for better understanding. With the above introduction, you can complete the following procedures.

Using my;
Using system;
Public Class ActiveX
{
Public static void main ()
{
Class1 S = new class1 ();
S. Show ();
}
}

Is the running interface of the compiled program:


Figure 5: program running interface

V. Summary:

Actvie X components are a huge family of powerful components with many functions. Taking full advantage of these Active X component resources is not only the use of previous resources, in addition, it can also solve many problems that are difficult or difficult to solve by relying on existing technologies. In fact, the usage of the Active X component in Visual C # is similar to that in Visual Basic. NET and Other. NET development languages.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.