Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

How To Make A Web Browser


92 replies to this topic

#1 rejected

    Super Nuclear Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 743 posts
  • Gender:Male
  • Location:Texas
  • Interests:I enjoy running cross country and track, and the occasional cocktail with some friends.
  • myCENT:51.02

Posted 25 December 2005 - 06:33 PM

This is a simple and specific tutorial on how to make a basic web browser in Visual Basic 6.

Steps 1-3
Create a new project, and then go to "Project" on the menu.
Click components as shown in the following image.
Posted Image
Find the component "Microsoft Internet Controls," check it, and click "Apply" and then "Close."
Posted Image
Click the icon that was just added in the tools window, and draw a large sized window with it. This is going to be where you view webpages through your browser, so don't make it small, but leave room for buttons and other accessories.

Steps 4-6
Make a textbox, this will be your URL bar where you type in the address of the website you want to see.

Make four command buttons, these are going to be your Go, Back, Forward, and Refresh buttons, change the captions accordingly, and name each of them Cmdgo, Cmdback, CmdForward, and CmdRefresh.

Now, here's the coding part. This is all it takes to make your webbrowser working.
Private Sub cmdback_Click()
WebBrowser1.GoBack
End Sub
Makes the back button go backwards, pretty much self explanatory.
Private Sub Cmdforward_Click()
WebBrowser1.GoForward
End Sub
Same concept, except this time the webbrowser goes forward.
Private Sub cmdgo_Click()
WebBrowser1.Navigate (Text1.Text)
End Sub
Makes your webbrowser go to the URL in your text box.
Private Sub cmdrefresh_Click()
WebBrowser1.Refresh
End Sub
Makes your web browser refresh.
Private Sub Form_Load()
WebBrowser1.Navigate ("http://thyelite.com")
End Sub
The URL shows your homepage, change it to http://google.com or whatever your usual homepage you would like to be.
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Text1.Text = (WebBrowser1.LocationURL)
Form1.Caption = (WebBrowser1.LocationName)
End Sub
This changes the text box's text into what URL that you're currently at, and the next line makes the caption of your form into the header of the URL.

There you are, a tutorial on how to make a browser, thanks for your time :D.

#2 SqlByte

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 172 posts

Posted 25 December 2005 - 07:00 PM

yeah... i made that or something similar long ago... but it was slow as hell... i was loading google for an half an hour :D
That stuff could be used for spoofing your browser id...
I remember ther where a way to build a web browser in php... il post it if ifind it.

#3 Eikon

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 69 posts

Posted 25 December 2005 - 07:34 PM

Hmm...Interesting stuff. I'll have to try this out when I get back to school from the holiday break, as I don't have VB6 on this computer.

#4 Inspiron

    Trap Grand Marshal Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,204 posts

Posted 25 December 2005 - 07:57 PM

It's also possible to do it with VB.NET. The internet browser created with Visual Studio actually takes the properties and settings configured for the Internet Explorer (IE) browser on your computer.

So basically, in other words, you have created a customised IE rather than your own browser.

#5 wild20

    Never alone with Christ

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 647 posts

Posted 25 December 2005 - 09:58 PM

Awesome, but I would worry about it messing with the integrity of your security. The main problem I also see with this is the fact that it could also make it run slower than usual. Is there a way to be able to switch between using the regular browser and the one you create? Overall it IS a good idea though and I think this is a great post. Thanks for the info and if I ever get the program I will try it.

#6 snlildude87

    Moderator

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2,325 posts
  • Location:Mawson, Antarctica

Posted 25 December 2005 - 11:18 PM

Yeah, a web browser needs a LOT more code than that. What you're doing, like Inspiron said, is making your very own custom Internet Explorer. It's like taking the source code of Firefox and modifying it to your likings...except less complicated.

#7 Compute

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 182 posts

Posted 26 December 2005 - 12:35 AM

YAYA I'v been looking everywhere for this. So is firefox made in visual basic lol. I though it.

Great tutorial. Really helped! thanks.

#8 Inspiron

    Trap Grand Marshal Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,204 posts

Posted 26 December 2005 - 03:36 PM

Firefox is not created with Visual Basic however. Rather it's impossible to believe that Firefox is created with Visual Basic because Microsoft owns Visual Basic and this language isn't free. So if Firefox is created with a paid programming language, then why it would be distributed free?

I'm not sure but I have a feeling that Firefox is created with C++ language..

#9 rejected

    Super Nuclear Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 743 posts
  • Gender:Male
  • Location:Texas
  • Interests:I enjoy running cross country and track, and the occasional cocktail with some friends.
  • myCENT:51.02

Posted 26 December 2005 - 04:44 PM

FireFox was created in C++, you can download the tarballs since it's an open source project..

#10 fraudulentpeanut

    Newbie [Level 2]

  • Kontributors
  • PipPip
  • 36 posts

Posted 26 December 2005 - 09:41 PM

This is a very interesting topic. There are so many web browsers out there and using VB as said in previous posts is just making a customized internet explorer. It actually will not run if you do not have internet explorer installed on your machine. Now taking and making a browser from the firefox sources would be pretty sweet. However, firefox is still the number one browser and is definately a lot faster than IE.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users