Making a Web Browser in Visual Studio

18,395

26

10

Introduction: Making a Web Browser in Visual Studio

This instructable will show you how to make a web browser in Visual Studio 2013.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Template

Open a new project in Visual Studio, and choose "Windows Forms Application".

Step 2: Getting What You Need

Next, go to the toolbox and get one textbox, 5 buttons, and one webBrowser.

Step 3: Naming the Buttons

Now you need to layout everything the way you want it. Now name your buttons: back, forward, go, refresh, and home.

Step 4: Programming Everything

This is my favorite part. Programming!! For each of the things we program you need to double click them to show the script.

For the back button, in the blank space type in WebBrowser1.GoBack() now close the script window

For the forward button, in the blank space type in WebBrowser1.GoForward() now close the script window

For the Go button, in the blank space type in WebBrowser1.Navigate(TextBox1.Text) now close the script window

For the Home Button, in the blank space type in WebBrowser1.GoHome() now close the script window

For the refresh button, type in WebBrowser1.Refresh() now close the script window

Now that we've programmed everything, it will work!!

Step 5: Debug It!

Now press F5, or go to bar on top with file, edit, view... Click the debug tab, then click start debuging. Now your browser will open up! When you click the home button, it should take you to your home page of your default web browser.

Step 6: Finishing

Now save your project, and you can visit your browser at anytime!

Automation Contest

Participated in the
Automation Contest

Coded Creations

Participated in the
Coded Creations

Be the First to Share

    Recommendations

    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge

    10 Discussions

    0
    elsep2003
    elsep2003

    Reply 5 years ago

    its not, this doesn't create a new browser. The web browser object is a OLE link to the OS browser, so it's probably internet explorer.

    0
    monsgex
    monsgex

    Reply 9 months ago

    Well, How can do we make a Really Web Browser?

    0
    25sayetheiss
    25sayetheiss

    2 years ago

    I couldn't do it from STEP 1. When I made it ist just appeared as HTML and stuff and I didn't know how to do that and a form didn't pop up so what do I do.

    0
    rosavanwinkle
    rosavanwinkle

    3 years ago

    You forgot at the end of each command to add a semicolon it wont debug otherwise

    0
    ChildOfYahweh
    ChildOfYahweh

    4 years ago

    How can you make a browser independent of IE or any other browser previously made?

    0
    cartyhead
    cartyhead

    Reply 4 years ago

    I'm not exactly sure. You could check on YouTube, or maybe even another instructable. Good question!

    There is one problem in this tutorial is that when you go to debug you get an "expected end of statement" message. To fix it you need a semicolon to end the statement. So instead of

    "WebBrowser1.Refresh()"

    you would have to type

    "WebBrowser1.Refresh();"

    Also this isn't technically your own browser it's just a more personalized version of your OS browser. (Internet Explorer if you are using windows) That is a very important note to add.

    Other than that this was a great tutorial!

    0
    thatoneguy1234
    thatoneguy1234

    5 years ago

    I tried this and the browser links to internet explorer so it was really slow and buggy I couldn't even visit Google without it going haywire

    0
    cartyhead
    cartyhead

    Reply 5 years ago

    It all depends on your computer speed and Internet speed.