Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 73,632 times

Contents

Related Categories

WebBrowser Control - The Basics

Paul Hughes

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….

Comments

  • Re: [18] WebBrowser Control

    Posted by DeviledGod on 02 Jul 2008

    Hi...I want some help about WebBrowser controls. More specifically i want to know how the URL textbox changes and gets the Browser's URL.


    When i click a link...

  • Re: [18] WebBrowser Control

    Posted by borqom on 06 May 2008

    Hi, As i know so far there is no go button, to create a button that takes you to a link you have to use a textbox (txtLink) and a button(btnlink) controls.


    I...

  • Re: [18] WebBrowser Control

    Posted by OsamaPs on 17 Jul 2006

    hi


    it is a great browser :D


    but where is th GO button?!!?!

  • Posted by ooo on 07 Nov 2005

    hey try to be more discrete i know hwo u are :)

  • Command in webbrowser

    Posted by Mikey123 on 05 Oct 2005

    Hi,
    I have created a web browser for it to load tankmania.com but what i need to know is how do i get a button to interact with the web browser eg: I click the button and it send a keyboard event to ...