References containing mshtml, shdocvw, and axshdocvw

Source: Internet
Author: User

In vs2005, mshtml is introduced in this way.

 

 

Add using mshtml at the beginning of the Code;

 

 

There is an article on the Internet to reference shdocvw:

Shdocvw must be found in the following path: (C:/program files/Microsoft Visual Studio 8/application/preemptive solutions/dotfuscator community Edition)

 

 

 

There is also an article to add references:

 

1. Create a Windows application project in Visual C #2005 or Visual C #. net. By default, form1 is created.

Note:: In Visual C #2005, if you cannot find the shdocvw. dll file or the axshdocvw. dll file, run the following command at the Visual Studio Command Prompt:

Aximp % WINDIR %/system32/shdocvw. dll

Then, create the Common Language Runtime Library proxy (shdocvw. dll) and Windows form proxy (axshdocvw. dll) for the Microsoft webbrowser control ). To add a DLL file in Visual C #2005, follow these steps:

 

A. On the "project" menu, click "add reference ".

B. In the "add reference" dialog box, click "Browse ".

C. Find and select the axshdocvw. dll and shdocvw. DLL files.

D. To add project references to these two files, click OK ".

2. Click "Custom toolbox" on the "Tools" menu to open the "Custom toolbox" dialog box. On the "COM components" tab, add a reference to "Microsoft webbrowser. Click OK to add the webbrowser control to the Windows Forms toolbox. The webbrowser control is displayed with the "Explorer" in the toolbox.

Note:: In Visual Studio 2005, step 2 is not required.

 

 

3. Use this toolbox to add a webbrowser control, an openfiledialog control, and a commandbutton control to form1. This adds "axwebbrowser1", "openfiledialog1", and "button1" member variables to the form1 class. In Visual C #2005, the "webbrowser1", "openfiledialog1", and "button1" member variables are added.

 

My name is vs2005, so there is nothing to say in step 1. However, after Step 1 is completed, the axwebbrowser1 control does not appear in the toolbox as in step 2. It is still the original webbrowser control.

 

 

 

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.