Programming: VB Programming Tutorial #2
Posted: Sat Oct 23, 2004 12:07 am
Well I finaly got enough time to write another tut.Sry to leave you guys hanging with the last one.With that said,lets begin
I will assume you know the basics by following the Visual Basic Programming Tutorial #1 so I wont have to repeat myself
Today,you will be learning something a bit more comlicated.But still easy.You will be learning how to make your own web browser.
Open vb and select Standard exe.Drag out the form so it looks like this

Go over into the properties menu and change the name Form1 to frmExplorer2
Then change the caption to Explorer 2
Not hold control and press the letter "T"
A menu should appear.Scroll down to Microsoft Internet Controls.Check the box and click ok.

Now a picture of the world has been added to your tool box.

Click on it,and drag it out onto the form.

Now clcik on a text box,and drag it out onto the form.

Click on the txt box and go down in the properties menu to Text
Change it from "Text1"to " "
Now drag out a command button onto the form.Change the name from "Command1" to "cmdgo"
Now change the caption to "Go!"

Looks kinda familiar now.
Now for the coding wich is very simple
Double click cmdgo
Now type
WebBrowser1.Navigate Text1.Text

Press F5 to run the program.Type the url into the textbox and press Go!

And thats a web browser.But if you want to create a little bit more.Continue on
Create a new command button and name it cmdback.Then change the caption to "Back"
Then add another command button and name it cmdforward.Then change the cpation to "Forward"

Double click on cmdback and type
On Error GoTo Error
WebBrowser1.GoBack
Error:
Exit Sub
Then double click on cmdforward.And type
On Error GoTo Error
WebBrowser1.GoForward
Error:
Exit Sub
Now when you are in the explorer,you can go back,and forward.
That ends this tut.Ill post more when I get my next break.Feedback please
I will assume you know the basics by following the Visual Basic Programming Tutorial #1 so I wont have to repeat myself
Today,you will be learning something a bit more comlicated.But still easy.You will be learning how to make your own web browser.
Open vb and select Standard exe.Drag out the form so it looks like this

Go over into the properties menu and change the name Form1 to frmExplorer2
Then change the caption to Explorer 2
Not hold control and press the letter "T"
A menu should appear.Scroll down to Microsoft Internet Controls.Check the box and click ok.

Now a picture of the world has been added to your tool box.

Click on it,and drag it out onto the form.

Now clcik on a text box,and drag it out onto the form.

Click on the txt box and go down in the properties menu to Text
Change it from "Text1"to " "
Now drag out a command button onto the form.Change the name from "Command1" to "cmdgo"
Now change the caption to "Go!"

Looks kinda familiar now.
Now for the coding wich is very simple
Double click cmdgo
Now type
WebBrowser1.Navigate Text1.Text

Press F5 to run the program.Type the url into the textbox and press Go!

And thats a web browser.But if you want to create a little bit more.Continue on
Create a new command button and name it cmdback.Then change the caption to "Back"
Then add another command button and name it cmdforward.Then change the cpation to "Forward"

Double click on cmdback and type
On Error GoTo Error
WebBrowser1.GoBack
Error:
Exit Sub
Then double click on cmdforward.And type
On Error GoTo Error
WebBrowser1.GoForward
Error:
Exit Sub
Now when you are in the explorer,you can go back,and forward.
That ends this tut.Ill post more when I get my next break.Feedback please