How To

How to Create a Web Browser using VB

Member
By Socrates
User-Submitted Article
(13 Ratings)

If you have ever wished you could build your own web browser, it's far easier than you think. Take a look.

Difficulty: Moderately Easy
Instructions

Things You'll Need:

  • Microsoft Visual Studio 2005
  • Some knowledge of Visual Basic
  1. Step 1
    Create VB Project
    Create VB Project

    Create a new Visual Basic Windows Application project. This sample project was named PersonalBrowser and saved locally.

  2. Step 2
    Change Form1 Text Property
    Change Form1 Text Property

    Click on Form1 and change its default Text property to "PersonalBrowser".

  3. Step 3
    Add WebBrowser Component
    Add WebBrowser Component

    From the Toolbox, add the WebBrowser component. It will fill the form. To change this, click the new WebBrowser1 and change its Layout Dock property from "Fill" to "Bottom". This will allow you to change it's size and make space for some extras.

  4. Step 4
    Add TextBox And Button
    Add TextBox And Button

    From the Toolbox, add a TextBox and a Button. Neatly position both above WebBrowser1.

  5. Step 5

    Change the Text property of Button1 to "Go". Modify the Anchor property on all three accordingly.

  6. Step 6
    Add button function
    Add button function

    Double-click on the button. This is how the browser will grab the address you type in TextBox1 (aka. address bar). Add the following:

    If TextBox1.Text = "" Then
    WebBrowser1.Navigate("www.ehow.com")
    Else
    WebBrowser1.Navigate(TextBox1.Text)
    End If

  7. Step 7

    Run the example to test it out. When you've got it tweaked with pictures, colors, and lots of extras, Publish your finished product and use it with pride!

Tips & Warnings
  • You can spiffy it up by making your button the default button on the page.
  • A commercial browser has a lot more functionality built into it such as History, Favorites, Tabs, and more. Spend a little time on it and you'll be amazed at what you can accomplish.

Comments  

howorhow said

Flag This Comment

on 7/4/2009 This guide is good, kinda confused me because I was using 2008 version, but I love this program, in like 10 minutes I already had a web browser (though it could only search at the time.

Flag This Comment

on 9/11/2008 It's a nice program for New Developer.
Santosh Raj, Ratlam

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Computers
Alexia Petrakos,

Meet Alexia Petrakos eHow's Computers Expert.

Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US

eHow Computers
eHow_eHow Technology and Electronics