Display a Web Page with Internet Explorer

Problem

You want to display an HTML page (or another type of document supported by Internet Explorer) in a Windows application.

Solution

Use the Web browser ActiveX control included with Internet Explorer.

Discussion

The .NET Framework does not include any controls for rendering HTML content. However, this functionality would be useful, either to display some local HTML content (like a rich help document) or some information from the Web (for example, a Web page that lists downloads a user might use to update an application).

To show an HTML page, you can add an Internet Explorer window to your Windows applications. This window not only supports HTML, it also supports JavaScript and Visual Basic Scripting Edition ...

Get Microsoft® Visual Basic® .NET Programmer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.