Release ActiveX controls compiled by C #

Source: Internet
Author: User

1. Use JavaScript to check whether an ActiveX control has been installed in the system.

 

  1. Try {
  2. VaR AX = new activexobject ("Control name ");
  3. Alert ("installed ");
  4. } Catch (e ){
  5. Alert ("not installed ");
  6. }

 

Release

1. Open cmd, enter C:/Windows/system32, and enter iexpress. Open the cab production tool

2. Click "Next" and select create compressed files only (ActiveX instils)

3. Click Add to add the generated setup. MSI and hello. INF. Next

4. Click Browse, select the storage path and file name of the generated cab file, and check the store files using long file name inside package. Next step

5. Select don't save. Click Finish. The cab file is generated.

6. Create a New hello.html file. The content is as follows:

<HTML>
<Head>
<Title> test </title>
</Head>
<Body>
<Object ID = "mycontrol" classid = "CLSID: 52a0874c-f75f-4abc-bd2c-6b300afc2e67" codebase = "Hello. Cab">
</Object>
<Input type = "button" onclick = "mycontrol. showmessage ()" value = "clickme" id = "button1"/>
</Body>
</Html>

8. Copy the HTML file and the cab file to the wwwroot/ActiveX/directory.

9. When you access the.../ActiveX/helloworld.html on another computer, the system will prompt that the control is not secure and windows will block installation. Solution: on the client browser, click "Tools> Internet Options> Security> Trusted Sites> sites ", deselect the preceding "server verification required for all sites in the region. Then add the server address to the trusted site. You can install this control.

 

Http://www.cnblogs.com/homer/archive/2005/01/04/86473.html-basics 1

Http://www.cnblogs.com/homer/archive/2005/01/08/88780.html-basics 2

Http://www.cnblogs.com/homer/archive/2005/01/26/97822.html-basics 3

 

Http://www.cnblogs.com/sgivee/archive/2011/08/10/2133500.html-basic integrated version and progid

 

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.