Home  >  Article  >  Backend Development  >  Graphic and text code details for developing ActiveX controls using C#

Graphic and text code details for developing ActiveX controls using C#

黄舟
黄舟Original
2017-03-06 11:08:272194browse

Activex control was also called ole control before. It is a software component or object supported by Microsoft IE. It can be inserted into a web page to implement dynamic program functions on the browser side to enhance dynamic processing on the browser side. ability. Usually activex controls are developed using c++ or vb language. This article introduces another way to develop activex controls using c# language.

Recently I have developed a function to use C# controls in Qt. The method used is to produce ActiveX controls through C# and use the ActiveX controls in Qt. This article briefly introduces how to use C# to generate ActiveX controls.

1. Create a WinForm UserControl project, select "Make assembly com visible" in the property page of the control

Assign Guid and add it to the control Go to GuidAttribute, the Guid defined here is the GUID of your ActiveX control


2. Compile and run, compile and run (requires administrator After setting the permission), you can simply test the control through the system's user control test container,


3. Publish the DLL

C#'s ActiveX control needs to be registered with the regasm program. The usage method is as follows:

Register regasm /codebase xxx.dll

Uninstall regasm /u xxx.dll

In addition, if the Dll depends on other Dlls, they should be released together.

The above is the details of the graphic code for developing ActiveX controls using C#. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn