How to create a basic Web Browser in Visual Basic

Today, I’ll be showing you how to create a very simple Web Browser with basic navigation controls. Today I am going to use Visual Basic 2010, If you don’t have get a free trial of Visual Studio from here (Any version after VB6). Visual Studio is a Creative Suite from Microsoft for developing Windows Applications. Visual Studio consists of three Programming languages namely Visual Basic, Visual C++, Visual C# (C Sharp) and Visual F# (F Sharp) (Recently announced in VB 11). Visual Basic uses .Net(dot net) programming language which is the easiest and the simplest of all the other Scripting Languages. So let’s begin

 

1.Create a new project and give it a name, Select ‘Windows Forms Application’ and select ‘Ok’.

2.Resize the form by making it bigger and in the properties Window, Change the ‘Text’ (In earlier versions, it is labelled as ‘Caption’) to the name of your Web Browser.

3.Insert 6 Buttons and a Text box from the Toolbox. Place them above the Window, They are going to be the navigation buttons.

4.Now with the Pointer selected, Change the Text of each of the buttons from the Properties windows  to Back, Forward, Go, Home, Refresh, Stop.

5.Inert a Web Browser and resize to fill almost the whole form but don’t cover the buttons and text boxes (i.e. Navigation Bar)

6.Double click on each of the buttons and add the following codes:

For Back button: Webbrowser1.Goback()
For Forward Button: Webbrowser1.Goforward()
For Go Button: Webbrowser1.Navigate(textbox1.text)
For Home Button: Webbrowser1.Gohome()
For Refresh Button: Webbrowser1.Refresh()
For Stop Button: Webbrowser1.Stop()

 7.Press F5 (or)  Select the ‘Play‘ button on the navbar to test your application. It should look something like this.

There’s so much you can do to your Web Browser like adding tabs, History, Search bar and lot’s more. I’ll be posting more articles so stay tuned….

Comments (4)

  1. <cite class="fn">CeleSVictoriA</cite> June 12, 2012

    let me see your body bounce ♪

    1. <cite class="fn">Haashir Mohammed</cite> June 12, 2012

      What do you mean by that??

  2. <cite class="fn">Woauiy</cite> June 13, 2012

    Thanks a lot…

    Hi there, I really like this article, it was really informative. I’ll be looking forward to coming again….

  3. <cite class="fn">Abel</cite> December 26, 2012

    Nice post. I was checking continuously this blog and I’m impressed! Extremely helpful info specifically the last part 🙂 I care for such info much. I was seeking this certain info for a long time. Thank you and good luck.

WRITE A COMMENT