To create an ActiveX control using VS2012

Source: Internet
Author: User

Recently received a small project that asked to write an ActiveX control embedded in IE run. Checked the information, Delphi required to make the VCL control, and then build the ActiveX control from the VCL control; VC's got all the vc6.0. After the wizard has created the code, use the Class Wizard to add the properties and methods of the control:


Adding methods and properties to the Automation option automatically generates the appropriate code in the interface and Control source code, and if the private (custom) method does not need to be exposed to the interface, you can add the build manually.

However, in the VS2012, the Class wizard does not have this Automation tab, which can only add variables and method functions, and also can not be exposed to the interface, manually add the mapping is too troublesome. So I checked with the help of VS.

File, finally found the answer: Find the Class View toolbox, you can see the app, CTRL, PropPage and IDL interface definitions, and then the second item of interface definition Right-click can find "Add properties" and "Add Method",

These two are the Lord's, and here is the equivalent of VC6 automation.

Previous image



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

To create an ActiveX control using VS2012

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.