SAMPLE: Automating Internet Explorer from Within a Contained VB ActiveX Control (181075)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 3.02
  • Microsoft Internet Explorer (Programming) 4.0
  • Microsoft Internet Explorer (Programming) 4.01
  • Microsoft Internet Explorer (Programming) 5
  • Microsoft Internet Explorer (Programming) 5.01
  • Microsoft Internet Explorer (Programming) 5.5
  • Microsoft Visual Basic Control Creation Edition for Windows 5.0
  • Microsoft Visual Basic Professional Edition for Windows 5.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic Learning Edition for Windows 6.0
  • Microsoft Internet Client SDK 4.0
  • Microsoft Internet Client SDK 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:
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: 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.

REFERENCES

For a Microsoft Visual Studio .NET version of this article, see 311295.
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:

Modification Type:MajorLast Reviewed:5/11/2006
Keywords:kbFAQ kbfile kbinfo kbSample KB181075