Displaying HTML Content with a Web Browser Control in Visual Basic
(Page 1 of 4 )
You've already been using a web browser control without realizing it. This article will explain how to use a web browser control a bit more flexibly than you have up until now.
Introduction
Perhaps you don't believe me if I tell you that you are already using a web browser control; in fact, you've been using it for a good many years. The IE.exe that is executed when you open Internet Explorer works through the web browser control.
The web browser control is a dynamic link library, called shdocvw.dll, hosted by Internet Explorer. The web browser in turn works through another dynamic link library, the mshtml.dll. This directly interacts with ActiveX controls, the script engine, Java applets, and so on that are embedded in HTML pages. Mshtml.dll is the component that takes care of the HTML and DHTML aspects of a web page.
If all of that sounds impressive, keep in mind that it's only the beginning. This is just a bird's eye-view of a control that contains a lot of functionality and flexibility. Readers are directed to Microsoft's documentation on this control at MSDN.
The web browser control normally takes the URL to display the HTML content; if the source is not an URL but some HTML content, it would throw up an exception or error. The object of this tutorial is limited to using this control to display HTML content that does not necessarily have an URL reference.
Next: Embedding a web browser control into a Windows form >>
More Visual Basic.NET Articles
More By Jayaram Krishnaswamy