FILE: Automating IE from Within a Contained VB ActiveX Control

Last reviewed: February 13, 1998
Article 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 file is available for download from the Microsoft Software Library:

 ~ Vbobjvw.exe (size: 42726 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

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.

Keywords          : kbfile kbsample
Technology        : kbInetDev ole
Version           : WINDOWS:3.02,4.0,4.01,5.0
Platform          : WINDOWS
Issue type        : kbhowto


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 13, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.