Internet Explorer Interoperability Technology Sample
This sample demonstrates how to automate Microsoft Internet Explorer using managed code. Using the unmanaged InternetExplorer type, the sample demonstrates the methods and events exposed by this class, and illustrates sinking Internet Explorer events in managed code.
For information about using the samples, see the following topics:
To build the sample using the Command Prompt
Open the Command Prompt window and navigate one of the language-specific subdirectories of the sample.
Type msbuild ExplorerCS.sln or msbuild ExplorerJSL.sln, depending on your choice of programming language.
To build the sample using Visual Studio
Open Windows Explorer and navigate to one of the language-specific subdirectories of the sample.
Double-click the icon for ExplorerCS.sln or ExplorerJSL.sln, depending on your choice of programming language, to open the file in Visual Studio.
In the Build menu, select Build Solution. The sample application will be built in the default \bin or \bin\Debug directory.
To run the sample
In the Command Prompt window, navigate to the directory that contains the built executable.
Type Explorer.exe.
Type a website's URL at the command line to open that website.
Press Enter to quit.
Note
This sample builds a console application. You must launch and run it using the Command Prompt to view its output.
Requirements
.NET Framework Version: 2.0, 1.1, 1.0
Remarks
This sample uses a reference to SHDocVw.tlb, a COM type library, to gain access to the InternetExplorer type that is defined in that library. When you build the sample, you will notice that the directory where Explorer.exe is built also contains SHDocVw.dll. Copying this DLL allows the common language runtime to load its types without the need to register the DLL in the Global Assembly Cache.
See Also
Reference
System.Runtime.InteropServices