Library tutorials & articles
WebBrowser Control
The Basics
Hello, I’m Paul Hughes and I will be taking the steps of building a web browser through Visual Basic.
You may think that building such a complex piece of software would take months and perhaps years to do properly. Well no you are wrong. With Visual Basic you can have a working Browser with just one line of code! The reason for this is the library known as SHDOCVW.DLL. This is the main file in Internet Explorer, and you can use it too.
Start a new project, and then to use the web browser control, go to the Components menu and select Microsoft Internet Controls. Click on OK and you should have a new icon which looks something like this:
Click on it, and then draw the size of the browser windows you want on the form. You should now what appears to be a white box. Now for the one piece of code which will make it work. Double click on the form.
Type in the following code in the code window(in the event known as Form_load)
Webbrowser1.Navigate "Http:\www.thtproductions.co.uk"
Exit the code window and start the program. If you are on the Internet, The browser should now go to the THT Productions Website. If you aren’t connected a Dial-Up Networking Box will come with your connections etc. Well Done you have made a extremely simple browser!!
This is something like what you should end up with….
Related articles
Related discussion
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
-
Can you describe Above simple VB6 code?
by pramodmca09 (0 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
Comments
Leave a comment
Sign in or Join us (it's free).