Automating IE from Within a Contained VB ActiveX Control

ID: Q181075


The information in this article applies to:
  • Microsoft Internet Explorer (Programming) versions 3.02, 4.0, 4.01
  • Microsoft Visual Basic Control Creation, Professional, and Enterprise Editions for Windows, version 5.0
  • Internet Client SDK, versions 4.0, 4.01


SUMMARY

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


MORE INFORMATION

The following files are available for download from the Microsoft Download Center. Click the file names below to download the files:

Vbobjvw.exe
For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.

More Information About the Sample

Vbobjvw is a Visual Basic sample that corresponds to the Objvw Active Template Library (ATL) sample included in the Internet Client SDK. This sample demonstrates the following:

  • Accessing Internet Explorer's Automation model and scripting model from within a contained Visual Basic ActiveX control.


  • Enumerating all ActiveX controls, links, and other tags in a page and sub pages. This includes an algorithm for recursively enumerating floating frames and framesets.


  • Marking a Visual Basic ActiveX control "Safe for scripting" and "Safe for initialization."


Running the Sample

After downloading the above file. Run the executable to extract the sample files. Open Vbobjvw.vbp in Visual Basic 5.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.

Additional query words:

Keywords : kbfile kbsample kbActiveX kbIE400 kbIE401 kbIE302 kbDSupport kbIEFAQ
Version : WINDOWS:3.02,4.0,4.01,5.0
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: January 27, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.