Introduction: 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

Open Visual Basic and start a new Windows Application.

Step 2: Adding the Tools

Add a:

Text Box
Web Browser
5 Buttons

in that order.

Step 3: Arranging the Pieces Right

Arrange them like this and rename them like I did.

Step 4: Now for the Code

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

Step 5: GO Button Code

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

Step 6: Back Button Code

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

Step 7: Forward Button Code

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

Step 8: REFRESH Code

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

Step 9: HOME Button

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

Step 10: Try It Out

Click on the Debug button

Step 11: 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!

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

Comments

author
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!

author

i was is my browser making fast is very in one

author

There is no need for semicolon on Visual Basic.

author
rileyb6 (author)2016-04-16

nevermind i figured it out

author
vino1001 (author)rileyb62016-09-14

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

author
rileyb6 (author)2016-04-16

nevermind i figured it out

author
rileyb6 (author)2016-04-16

how do I rename t the buttons?

author
rileyb6 (author)2016-04-16

how do I rename t the buttons?

author
JamieM56 (author)2015-12-08

here's mine

Untitled.png
author
starvf made it! (author)2015-12-03

I Made it

web.png
author
SaherM made it! (author)2015-10-20

i made it :D

Untitled.png
author
narbie1995 (author)2015-03-11

author
blessed mcdavidp (author)2015-02-20

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

author
blessed mcdavidp (author)2015-02-20

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

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

author
lolcat360 (author)PKM2008-11-20

i made a better one. heres a picture

internetbrowser1.jpg
author
BraedenAM (author)lolcat3602011-06-23

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

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

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

author
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

author
arikyeo (author)munchman2009-11-14

actually, it's called geckofx.

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

author
jamesjph (author)arikyeo2010-12-31

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

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

author
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

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

author
lolcat360 (author)lolcat3602008-11-22

I mean "not"

author
andrewdpham3 (author)PKM2009-01-31

wait so it isnt really a web browser?

author
ksoza (author)2014-09-22

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

author
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!

Web Browser Picture.png
author
torned00 (author)2013-01-17

how to set the homepage?

author
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! :)

author
torned00 (author)2013-01-17

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

author
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! :)

author
alegaspi1 (author)alegaspi12012-12-04

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

author
lolcat360 (author)alegaspi12012-12-27

Do you still have time?

author
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

author
kailashmayani (author)2012-11-27

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

author
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...../

author
joynal (author)2012-01-31

Hi


i want web browse fixt web....

how can i make.. can u help me?

author
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)

Untitled.png
author
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

author
jamesjph (author)jamesjph2010-12-31

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

author
lolcat360 (author)jamesjph2011-10-10

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

author
SpireX Studios (author)lolcat3602011-10-12

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

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

author
collard41 (author)2008-11-23

can someone upload a finished version. thanks 5* faved

author
jbrar (author)collard412011-07-02

CHECK OUW WWW.FIREDBROWSER.CO.CC

author
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?

author
jbrar (author)2011-07-02

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

author
sahmad2 (author)2011-05-13

i did mine but when i press play for the first time it says windows browser can not start debugging because it cannot finde a file

About This Instructable

277,387views

36favorites

License:

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