Udostępnij za pośrednictwem


WebBrowser Control Overviews and Tutorials

This section contains overview and tutorial articles for WebBrowser Control.

Overview/Tutorial

Topic Contents
About the Browser

This section explains the architecture of Microsoft Internet Explorer 4.0 and later and provides information you will find helpful when reusing these components.

Handling Events in Visual Basic Applications

How do you trap events in objects contained by WebBrowser objects in a way that enables you to handle the events with native Microsoft Visual Basic code? This article explains how to create a Visual Basic-based application that consists of a class module and a form that contains a WebBrowser object. Members of the class trap events from an HTML document object contained by the WebBrowser object, then "forward" the events to a procedure in the form. Visual Basic code in the form can then execute in response to the forwarded events.

Licensing and Distribution

Beginning with Internet Explorer 4.0, application developers who want to redistribute Windows Internet Explorer technologies—such as the WebBrowser Control, Wininet.dll, Urlmon.dll, or Comctl32.dll (or Common Controls DLL)—must obtain a royalty-free redistribution license for Internet Explorer and download a copy of the Internet Explorer Administration Kit (IEAK) through the IEAK Web Site.

Loading HTML content from a Stream

The IPersistStreamInit interface, and its associated methods, can be used to load HTML content from a stream using the WebBrowser control and Microsoft Visual C++.

Reusing the WebBrowser Control

The WebBrowser control adds browsing, document viewing, and data downloading capabilities to your applications. Applications using this control will allow the user to browse sites on the Internet's World Wide Web, as well as folders in the local file system and on a network. The WebBrowser control supports Web browsing through both point-and-click hyperlinking and URL navigation. The control maintains a history list that allows the user to browse forward and backward through previously browsed sites, folders, and documents.

Using MFC to Host a WebBrowser Control

This tutorial explains how to use the Microsoft Foundation Classes (MFC) to add a WebBrowser control to your C++ application.

WebBrowser Customization

This tutorial shows you several ways to customize the "out of the box" behavior and appearance of the WebBrowser Control. You'll see how to use the advanced hosting interfaces IDocHostUIHandler, IDocHostUIHandler2, IDocHostShowUI, and ICustomDoc. This article will also look at other customization techniques such as download control through handling DISPID_AMBIENT_DLCONTROL in the host's IDispatch implementation, and using IHostDialogHelper.

WebBrowser Customization (Part 2)

Part 1 of this tutorial introduced several of the standard hosting interfaces for the WebBrowser Control: IDocHostUIHandler, IDocHostShowUI, and ICustomDoc, to name a few. Part 2 of this article explains how to retrieve a reference to the client site while processing IPersistMoniker::Load, and how to use the IServiceProvider and IOleCommandTarget interfaces to send messages between the Active document (DocObject) and its host.