• Log in or sign up for an account here: https://www.sythe.org/login

[Tutorial] How To Make A Web Browser!

htaed

Forum Addict
Banned
Joined
Dec 19, 2005
Sythe Gold
0
Messages
336
Age
38
Location
Anchorage, Alaska
[Tutorial] How To Make A Web Browser!
Creating a Web Browser in Visual Basic 6

Step 1.

Create a new project in Visual Basic 6.

Step 2.

Right click on your toolbox and click on Components.

Component1.png


Step 3.


Scroll down and select these two controls, then click OK.

Component2.png


Step 4.

You should have two new tools like this

NewThings.png


The one that looks like earth is a Web Browser Control, and the other is a Inet control.

Step 5.

Now, put the following on your form.

Textbox Name: address
Command Button | Name: go | Caption: Go
Command Button | Name: back | Caption: Back
Command Button | Name: forward | Caption: Forward
Command Button | Name: refresh | Caption: Refresh
Command Button | Name: stop | Caption: Stop
Command Button | Name: source | Caption: View Source
Web Browser control | Name: web
Inet Control | Name: grabsource

Step 6.

Arrange them like this:

LookLike.png


Step 7.

EDIT: on the line before every Error: put Exit Sub, EG

Code:
On Error Goto Error:
                                 Web.GoBack
                                 Exit Sub
                                 Error:
                                 Msgbox "Couldnl't Go back",vbinformation,"Error"
                                 End Sub

As the code for them, put this.

Code_Main.png



Step 8.

Okay, now we add a new form, and rename form1 to main, and our new one form2 to Sourcecode

Forms.png


Step 9.


Ok so double click on our new form named Sourcecode.

Add the following:

Textbox | Name: source | Multiline: Yes | Font: Times New Roman
Command Button | Name: srefresh | Caption: Refresh

Step 10.


It should look like this:

Source.png



Step 11.


Then add the following code:

SourceCODE.png



Step 12.


Your now finished with your webbrowser!!

Thank you for reading! =]
 
[Tutorial] How To Make A Web Browser!
nice basic tut. I like that there is a lot of pictures. Keep the guides commin.
 
[Tutorial] How To Make A Web Browser!
when i start it comes up with compiler error
label not defined and high lights On Error GoTo Error
 
[Tutorial] How To Make A Web Browser!
yea no needed Covey is right
 
[Tutorial] How To Make A Web Browser!
Ok I guess for someone brand new to vb. A better trick would be making a webbrowser without using the Internet Controls.
 
[Tutorial] How To Make A Web Browser!
nice guide. wewt created my first browser. Excellent guide.
 
Runescape Gamblingrunescape gambling
Back
Top