Graphic code details for developing ActiveX controls using C #

Source: Internet
Author: User
An ActiveX control, formerly known as an OLE control, is a software component or object supported by Microsoft IE that can be inserted into a Web page to perform dynamic program functions on the browser side to enhance the dynamic processing capabilities of the browser side. Typically, ActiveX controls are developed in the C + + or VB language, and this article describes another way to develop ActiveX controls using the C # language.

Recently, a feature that uses C # controls in Qt is used to produce ActiveX controls in C # and use the ActiveX control in Qt. This article briefly describes how to build ActiveX controls in C #.

1. Establish the WinForm UserControl project, select "Make assembly COM visible" in the control's property page

Assign a GUID, add GuidAttribute to the control, and the GUID defined here is the GUID of your ActiveX control.


2. Compile run, compile run (requires Administrator privileges) can be easily tested by the system's user Control Test Container,


3. Publishing DLLs

C # ActiveX controls need to be registered with the REGASM program, using the following methods:

注册 regasm /codebase xxx.dll

卸载 regasm /u xxx.dll

Also, if the DLL relies on other DLLs, it should be published together.

The above is the content of the code details of developing ActiveX controls using C #, more about topic.alibabacloud.com (www.php.cn)!

  • Related Article

    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.