Frame

The Frame control enables showing Html contents, including web pages. The most basic usage is assigning its Source property with an Uri, as in the following example:

<Frame Source="http://www.visual-basic.it" />

Figure 32.8 shows how the website appears in the Frame control.

Figure 32.8 Opening a website with a Frame control.

image

This control exposes a Navigate method that enables programmatically browsing html contents and/or web pages as in the following snippet:

Frame1.Navigate(New Uri("Http://www.visual-basic.it"))

You can also point to an html file on disk; just remember that each content name must be converted into Uri.

Using WebBrowser ...

Get Visual Basic® 2010 Unleashed 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.