9.19. Display a Web Page in a Windows-Based Application


You want to display a web page and provide web-navigation capabilities within your Windows Forms application.


Use the WebBrowser control to display the web page and other standard controls like buttons and text boxes to allow the user to control the operation of the WebBrowser.

The WebBrowser control is a managed wrapper around the WebBrowser ActiveX control, which is the same component used by Internet Explorer. This means that if you use a Main method, it must be annotated with the STAThread attribute. Furthermore, the component is very resource-intensive and should be ...

Get Visual Basic 2008 Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.