Introduction: Make a Web Browser in Visual Basic

Picture of Make a Web Browser in Visual Basic

Im going to teach you how to make a web browser in Visual Basic 2005.

Step 1: Starting

Picture of Starting

Open Visual Basic and start a new Windows Application.

Step 2: Adding the Tools

Picture of Adding the Tools

Add a:

Text Box
Web Browser
5 Buttons

in that order.

Step 3: Arranging the Pieces Right

Picture of Arranging the Pieces Right

Arrange them like this and rename them like I did.

Step 4: Now for the Code

Picture of Now for the Code

Double click on the form and type in:
Me.Text = "Web Browser"
like this:

Step 5: GO Button Code

Picture of GO Button Code

double click on the Go button and type in:
WebBrowser1.Navigate(TextBox1.Text)

Step 6: Back Button Code

Picture of Back Button Code

Click (actually double click) on the back button and type in:
WebBrowser1.GoBack()
like this

Step 7: Forward Button Code

Picture of Forward Button Code

Double click on the forward button and type in:
WebBrowser1.GoForward()
like this

Step 8: REFRESH Code

Picture of REFRESH Code

double click on the refresh button and type in:
WebBrowser1.Refresh()
like this

Step 9: HOME Button

Picture of HOME Button

Double click on the home button and type:
WebBrowser1.GoHome()
like this

Step 10: Try It Out

Picture of Try It Out

Click on the Debug button

Step 11: Publishing It

Picture of Publishing It

Click on build
then click on publish and keep clicking next
like these three pictures Im putting up

Step 12: You're Finished!

Picture of You're Finished!

you've finally created a web browser! now give yourself a hand and go sell it online or something.

Comments

Dre_18_00 made it! (author)2017-10-10

now to work on a tabbed browser version

Error_corrupted_file (author)2015-05-13

A problem many of you may have with an expected end of statement is that you need a semicolon to end the statement. So instead of

"WebBrowser1.Refresh()"

you would have to type

"WebBrowser1.Refresh();"

Other than that this was a great tutorial!

i was is my browser making fast is very in one

There is no need for semicolon on Visual Basic.

rileyb6 (author)2016-04-16

nevermind i figured it out

vino1001 (author)rileyb62016-09-14

click on any button, on right side their property shown, go to the text property and rename button name

rileyb6 (author)2016-04-16

nevermind i figured it out

rileyb6 (author)2016-04-16

how do I rename t the buttons?

rileyb6 (author)2016-04-16

how do I rename t the buttons?

JamieM56 (author)2015-12-08

here's mine

starvf made it! (author)2015-12-03

I Made it

SaherM made it! (author)2015-10-20

i made it :D

narbie1995 (author)2015-03-11

blessed mcdavidp (author)2015-02-20

am getting an error that their is an expected end of the statement.

blessed mcdavidp (author)2015-02-20

am getting an error that their is an expected end of the statement.

PKM (author)2008-11-19

I would point out that the "WebBrowser" control is effectively an embedded Internet Explorer, so you are really creating a "skin" for the browser rather than creating your own, but that is picking nits- this is a simple but effective project. If only real browsers had controls that minimalist...

lolcat360 (author)PKM2008-11-20

i made a better one. heres a picture

BraedenAM (author)lolcat3602011-06-23

How do you change the name of the program so it doesn't say "Form1" all the time?

wc3717 (author)BraedenAM2014-10-01

You have to click on the form and in the bottem right corner click on text and type in the name and press enter.

PKM (author)lolcat3602008-11-20

Now, see, if the WebBrowser control was Firefox rather than Internet Explorer I would totally use that- I could do without losing 110 vertical pixels of my pathetically tiny monitor.

munchman (author)PKM2009-01-13

You can download that. It is called Mozilla Browser control - you can download the DLL somewhere but I can't remember

arikyeo (author)munchman2009-11-14

actually, it's called geckofx.

forum website: geckofx.org
main website: http://code.google.com/p/geckofx/ 

jamesjph (author)arikyeo2010-12-31

No. There's one available from Mozilla called Mozilla Browser Control. Google it.

lolcat360 (author)PKM2008-11-22

Maybe if you only have firefox then that's what the control will be. If you don't have Internet Explorer, chances are that's now what the web browser will be.

foxtrot4697 (author)lolcat3602009-05-11

internet explorer is what opens my computer and my documents, and stuff like that, so its pretty much impossible not to have it

PKM (author)lolcat3602008-11-23

Sadly I'm pretty sure it doesn't work like that- Visual Basic is a Microsoft product that assumes a Windows environment so will always have Internet Explorer around, even if it's not the default browser. I work with this technology in my job and we have to pay attention to the subtle differences between Internet Explorer and Firefox because some of our older technologies only work with IE. I'm not sure you can get rid of Internet Explorer- it's a core part of Windows that I don't think you can uninstall like other programs. Shame...

lolcat360 (author)lolcat3602008-11-22

I mean "not"

andrewdpham3 (author)PKM2009-01-31

wait so it isnt really a web browser?

ksoza (author)2014-09-22

how would i make a favorites button an dsettings tab and bookmarkbar and allow extentions?

kwilson962 made it! (author)2014-08-31

I needed a browser for my XP computer. IE kept crashing, and Chrome would not install due to outdated hardware. To get the install working on the XP, I did need to first download and install "Windows Imaging Component (WIC)" from Microsoft.

For the textbox and the buttons, I used a tablelayoutpanel with column widths set to percentages and rows set to autosize (with textbox spanning all but one column). I put that table (dock set to top) and the webbrowser control (dock set to fill) into another tablelayoutpanel with rows autosized (and only one column). That way I could maximize the program and everything would look the same.

I will be adding tabs and adding an option to set home page to current page. And who knows what else?

Thanks for the quick start!

torned00 (author)2013-01-17

how to set the homepage?

rpetersons (author)torned002014-06-26

Hi,

Just add this line to Home button:

" WebBrowser1.Navigate("http://www.libraryofarticles.com") " (without quotas and choose any website you like) :)

and line "WebBrowser1.GoHome()" you can delete or add « ' » before line, like this:

" 'WebBrowser1.GoHome() ". This line now should be green.

But mainly, if there is not this code line in «Home» button, it will open your default home page you have set on your windows internet options. :)

Hope it works for you!

Peace! :)

torned00 (author)2013-01-17

is it possible to create portable apps in vb2005/2008?

alegaspi1 (author)2012-12-04

Okay, This Instructable is pretty awesome. You see, I was gonna use this for my science fair. (:D) I was wondering, do you know how to put a print and stop button? How to add bookmarks and Bookmarks Bar? how to put an icon for when it loads a site? and a loading bar? How to change the home site? How to fix the "script error" message? Please Message me! :)

alegaspi1 (author)alegaspi12012-12-04

BTW, can i use this for science fair project? (Don't worry, deadline is far away.) :)

lolcat360 (author)alegaspi12012-12-27

Do you still have time?

alegaspi1 (author)lolcat3602012-12-27

Yeah! Don't worry man, I have a lot of time. My parents are letting me do the science fair very early. :P

kailashmayani (author)2012-11-27

it is just simple browse by the way how to auto refresh in this browser.............//////

heer_soni (author)2012-07-05

Hey ol... need to make some Web based project......kind of a web browser or any other application ....any suggestionss... Can afford working offtrack...../

joynal (author)2012-01-31

Hi


i want web browse fixt web....

how can i make.. can u help me?

arikyeo (author)2009-11-27

 this is what ive created... will make an 'ible next time(I AM NOT GIVING UP MY SOURCE CODE - HAW-HAW!!!)it's using the office ribbon GUI (dl from componentfactory.com)

jamesjph (author)arikyeo2010-12-31

Dude. (Maybe?) I started my own software company based on this Instructable. I made Jphweb Carbon it uses the same principle as yours. Its open-source too. http://carbon.jphweb.tk

jamesjph (author)jamesjph2010-12-31

Plus mine uses Trident (used here), GeckoFX and Webkit .NET

lolcat360 (author)jamesjph2011-10-10

Cool, I'm going to try it.
BTW, I was only 8 when I made this Instructable. :)

SpireX Studios (author)lolcat3602011-10-12

Wow, 8? I'm 12 and I don't know VB! Way to go!

twilliams32 (author)2011-10-10

Many websites redirect you once you go to a homepage. However, these instructions do not bind or otherwise update the textbox to reflect this.

collard41 (author)2008-11-23

can someone upload a finished version. thanks 5* faved

jbrar (author)collard412011-07-02

CHECK OUW WWW.FIREDBROWSER.CO.CC

marselsipod (author)collard412009-04-11

just download this thing called "Mozzila firefox" if you want a finished one. GAWD! if you arnt gonna make one, why the hell bothering to get a simple internet explorer based browser instead of the real thing?

jbrar (author)2011-07-02

DOWNLOAD THIS.......................BETTER THAN OTHER
WWW.FIREDBROWSER.CO.CC

About This Instructable

279,692views

36favorites

License:

More by lolcat360:Customize Windows XPMake a web browser in visual basicMake a really cool cursor in paint
Add instructable to: