VB Web Browser Control

The Web Browser control allows you to build a web browser.
There are several functions and properties you can access which gives you access to creating a beginners basic to a more advanced web browser.
Below are a list of functions and properties with short descriptions to what each function/property does.

Web Browser Functions
Navigate Go WebBrowser1.Navigate("http://www.google.ca")
Browser will navigate to specified URL at runtime
Navigate Back WebBrowser1.GoBack()
Sends Web Browser to previous visited page.
This is used to navigate to previous web pages.
Navigate Forward WebBrowser1.GoForward()
Works the same as Back but sends web browser to the
Next page if the Previous page is displayed
Navigate Home WebBrowser1.GoHome()
Sends the web page to the default URL (specified under Navigate Go)
Browser Refresh WebBrowser1.Refresh()
Refreshes the web browser
Browser Stop WebBrowser1.Stop()
Stops the progress of the web browser while loading
Web Browser Properties
Browser Status WebBrowser1.StatusText
Displays the current status of the web page loading
Default URL WebBrowser1.url
Sets the default web browser URL which is displayed at runtime.
Status Check WebBrowser1.IsBusy
This is a Boolean (True Or False)
Checks to see if the web browser is busy loading content from the web page.
Ready State WebBrowser1.ReadyState
Gets the current state of the web browser (Should be used on a timer for
accurate results)
Results are fetched as a Numerical value (There are 4 values/steps a browser
goes through) 

4 = Complete 3 = Interactive 2 = Loaded 1 = Loading
Browser has loaded everything Browser is still working Browser has loaded but
not all data
Browser loading new doc.

Ready State example of use:
Declare 4 variables, 1 for each state.

Dim Complete As String = WebBrowser1.ReadyState = WebBrowserReadyState.Complete

Dim Interactive As String = WebBrowser1.ReadyState =
WebBrowserReadyState.Interactive

Dim Loaded As String = WebBrowser1.ReadyState =
WebBrowserReadyState.Loaded

Dim Loading As String = WebBrowser1.ReadyState =
WebBrowserReadyState.Loading

Use your declarations in If  statements


If Interactive Then Me.Text = "Not yet loaded"

ElseIf Complete Then Me.Text = "Ready"

End If

0saves
If you enjoyed this post, please consider subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply

Donations

Donations help to produce more content, more and better video tutorials

Youtube Channel Of The Week

JD Site Care chose
GoVisualTeam

Advertisement