How to use C # to make an ActiveX control or something similar

xiaoxiao2021-03-06  71

How to use C # to make an ActiveX control or something similar

Number: QA004728 Establishment date: October 17, 2003 Date: October 18, 2003 Category:

C # - ACTIVEX Technology

Q Cat: Operating System: 2000 / XP Programming Tools: VS.NET 2003 / C # Problem: I want to make an ActiveX control or similar thing, have a user interface, and then use VBScript to exchange through VBScript, It seems that you can use VB before, but now is a vs.net 2003 enterprise version, it seems that ActiveX has become an old technology, how do VS.NET solves this similar problem? How do you operate if you want to use C # to program? There is also an interface.

A Answer:

Corresponding to the ActiveX control in the C # is the Windows Control Library (User Controls). Activate the Windows Forms control in IE to complete: * Create a Windows Forms Control; * Create an HTML document containing the object tag; * Create a virtual directory, copy and set permissions; * Configuring code access; * Run the control . 1. Windows Forms Control: SimpleControl.dll Almost all Windows Forms controls can be used, but in this example, we use the SimpleControl control included in the .NET Framework SDK QuickStart Tutorial Creating Controls. 2. HTML Document: SimpleControl.html Next, one step is to generate an HTML document with an object TAG to activate the Windows Forms control. In addition, some scripts and input Tag (Input Tags) to the demonstration program portions of the control. Object Tag: ClassID contains two interesting parts: the path and full name of the parallel control library, which is separated by" # "in the middle. If you are familiar with the ActiveX object tag, you will find that we didn't use the GUID. In the Windows form, the overall path and full name (full Qualified Name) are used together as a unique identifier. The parameter tag is used to set the properties of the control: "Name" parameter is the property name, and the "value" parameter is the value of the property. Script: