Microsoft KB Archive/181075

= SAMPLE: Automating Internet Explorer from Within a Contained VB ActiveX Control =

Article ID: 181075

Article Last Modified on 5/11/2006

-

APPLIES TO


 * Microsoft Internet Explorer 3.02
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 Service Pack 2
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5
 * Microsoft Visual Basic 5.0 Control Creation Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Internet Client Software Development Kit 4.0
 * Microsoft Internet Client Software Development Kit 4.01

-



This article was previously published under Q181075



SUMMARY
This sample illustrates how to use Internet Explorer's Automation model and scripting model from within a contained Visual Basic ActiveX control.



MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

Vbobjvw.exe

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

More Information About the Sample
Vbobjvw is a Microsoft Visual Basic sample that corresponds to the Objvw Active Template Library (ATL) sample that is included in the Internet Explorer Samples Catalog. The Internet Explorer Samples Catalog is located at the following Microsoft Web site:

http://msdn.microsoft.com/workshop/samples/all.asp

This sample demonstrates how to:
 * Access Internet Explorer's Automation model and scripting model from within a contained Visual Basic ActiveX control.
 * Enumerate all ActiveX controls, links, and other tags in a page and sub pages. This includes an algorithm for recursively enumerating floating frames and framesets.
 * Mark a Visual Basic ActiveX control "Safe for scripting" and "Safe for initialization."

Running the Sample
After you download the file, run the executable to extract the sample files. Open Vbobjvw.vbp in Visual Basic 5.0 or 6.0. Make Vbobjvw.ocx (this will also register the control). Open the TestVB.htm file, which contains an instance of the control and links to several test pages.

