In order to
create the web browser, you need Microsoft Internet Control. This control is not available at default VB6 IDE, you have to add it from the components window. To add this control, press Ctrl+T to open up the
components window and select Microsoft Internet Control. After selecting the control, you will see the control appear in the toolbox as
a small globe. To insert the Microsoft Internet Control into the form,
just drag the globe into the form and a white rectangle will appears in
the form. You can resize this control as you wish. This control is given
the default name WebBrowser1.
To design the interface, you need to insert one combo box which will be used to display the URLs. In addition, you can insert a few images which will function as command buttons for the user to navigate the web; they are the Go command, the Back command, the Forward command, the Refresh command and the Home command. You can actually put in the command buttons instead of the images, but using images will definitely improve the look of the browser.
The procedures for all the commands are relatively easy to write. There are many methods, events, and properties associated with the web browser but you need to know just a few of them to come up with a functional Internet browser
The method navigate is to go the website specified by its Uniform Resource Locator(URL). The syntax is WebBrowser1.Navigate (“URL”). In this program, we loaded the www.vbtutor.net web page at start-up.
Copyright ® 2008 Dr.Liew Voon Kiong . All rights reserved |Contact: firstname.lastname@example.org