Welcome Guest ( Log In | Register )




                Web Hosting

 
Reply to this topicNew Topic
Making A Web Browser With Visual Basic 6
William Wood
post Aug 21 2007, 06:53 AM
Post #1


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 7
Joined: 9-August 07
Member No.: 23,941


Hi everyone!
I'm going to tell you how to make a very simple web browser with Microsoft Visual Basic 6.0. Its basically a customized version of Internet Explorer, though, so enjoy!

First of all, you need to start a new project, make a Standard EXE. Then click on the Project menu and select Components. Check Microsoft Internet Controls and click Apply.
From the Insert menu, click on the icon that has just appeared.
Drag it onto the program layout, but make sure you make the program big enough and leave a space at the top for all the web buttons.

Make a text box and drag it where you want it to go. Now make four command buttons which will be GO, REFRESH, BACK and FORWARD. Then name each of them Cmdback (BACK), CmdForward (FORWARD), CmdGo (GO), and CmdRefresh (REFRESH).

Now here is where you put in the codes.

On the BACK button, insert this code
----------------------------------------------------
Private Sub cmdback_Click()
WebBrowser1.GoBack
End Sub

----------------------------------------------------
This tells the browser to go Back.
On the FORWARD button, insert this code.
----------------------------------------------------
Private Sub Cmdforward_Click()
WebBrowser1.GoForward
End Sub

----------------------------------------------------
This tells the browser to go Forward.
On the GO button, insert this code.
----------------------------------------------------
Private Sub cmdgo_Click()
WebBrowser1.Navigate (Text1.Text)
End Sub

----------------------------------------------------
This tells the web browser to go to the page you want it to.
On the REFRESH button, insert this code.
----------------------------------------------------
Private Sub cmdrefresh_Click()
WebBrowser1.Refresh
End Sub

----------------------------------------------------
This tells the browser to refresh the page.
On the FORM1 insert this code.
----------------------------------------------------
Private Sub Form_Load()
WebBrowser1.Navigate ("http://www.google.com/")
End Sub

----------------------------------------------------
This makes your homepage, simply change http://www.google.com to the page you want, if otherwise.
On the WEBBROWSER1 insert this code.
----------------------------------------------------
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Text1.Text = (WebBrowser1.LocationURL)
Form1.Caption = (WebBrowser1.LocationName)
End Sub

----------------------------------------------------
It makes the URL name the header, and changes the address to the place you wish to go.
Thats all! Save your project, and enjoy your customized web browser! smile.gif
Go to the top of the page
 
+Quote Post
Sten
post Aug 21 2007, 07:40 AM
Post #2


Oh come on Mrs. B!
Group Icon

Group: Members
Posts: 648
Joined: 6-June 07
From: Tasmania, Australia
Member No.: 22,422


i would try it if only i had visual basic
i have another program called browser bob which makes customized browsers based on internet explorer
its basically internet explorer but with your own look, u can make your own buttons, pictures, borders and boxes, stuff like that
Go to the top of the page
 
+Quote Post
Jimmy89
post Aug 21 2007, 12:42 PM
Post #3


Living at the Datacenter
Group Icon

Group: [HOSTED]
Posts: 708
Joined: 30-June 06
From: Australia
Member No.: 14,219
myCENTs:76.93


If memory serves me right (and its been a long time), in VB6 there was a Web Browser template that could be used! It put in the browser control, status bars, menus etc etc. Which was good if you were adding simple browsers to your project!

I must say that I prefer the new browser control in VB.NET! It has many more options then the VB6 one did! Sten, if you want to try out VB, have a look at the Visual Studio Express Editions (search on this board, theres heaps of topics!). You can have a go of any of the .NET languages for free!
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   8 bridenhosen 1,738 5th January 2009 - 01:38 PM
Last post by: iG-Ernesto Gramcko
No New Posts   1 Mahmoodm 96 4th January 2009 - 07:43 AM
Last post by: tansqrx
No New Posts   11 Feelay 620 31st December 2008 - 09:45 AM
Last post by: mastercomputers
No New Posts   5 HellFire121 1,036 29th December 2008 - 07:41 PM
Last post by: iG-Tara
No New Posts   2 tansqrx 161 27th December 2008 - 05:29 AM
Last post by: hac
No New Posts   1 cherri 1,357 21st December 2008 - 09:59 AM
Last post by: iG-Christian
No New Posts   7 solanky 3,319 19th December 2008 - 09:34 AM
Last post by: iG-preety sharma
No New Posts 11 Propeng 1,376 17th December 2008 - 10:40 PM
Last post by: yordan
No New Posts 13 Habble 3,412 17th December 2008 - 04:02 PM
Last post by: ryantommo
No New Posts   11 TheCapo 449 13th December 2008 - 01:07 PM
Last post by: tek3D
No New Posts   17 l337 Nurse Pedestrian 9,018 12th December 2008 - 02:52 AM
Last post by: iG-biswarup ghosh
No New Posts   11 ViRuaL 2,363 10th December 2008 - 10:14 PM
Last post by: iG-nick
No New Posts   8 iceblade 1,397 6th December 2008 - 12:59 PM
Last post by: iG-David
No New Posts   8 Mico 456 2nd December 2008 - 07:14 AM
Last post by: The_Fury
No New Posts   6 zemon1 178 30th November 2008 - 06:17 AM
Last post by: Darasen