Programming: VB Programming Tutorial #2
Programming: VB Programming Tutorial #2
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
Feel free to send me an instant message if you need anything.
-
- Posts: 732
- Joined: Wed Nov 26, 2003 11:59 pm
- Location: Raleigh, NC, USA
For Visual Basic examples and examples for a lot of other programming languages go to http://www.pscode.com. I've learned a ton from that site.
-
- Posts: 773
- Joined: Tue May 04, 2004 7:14 am
- Location: Uranus
Im making a version of it for my clan, Chaos Legion. Does any one know a code so when you click a button it like puts the url in the text box and you can click Go, Cuz I want to make a menu with Links and have like all different Halo links. And I want to program it so when you click it, a link pops up in the text bar (thing where you put address)
Your image cannot exceed 400x200 or 50kb
-
- Posts: 773
- Joined: Tue May 04, 2004 7:14 am
- Location: Uranus
-
- Posts: 773
- Joined: Tue May 04, 2004 7:14 am
- Location: Uranus
-
- Posts: 19
- Joined: Mon Oct 25, 2004 5:39 pm
ohh, even though it doesnt have any importance to modding, can i make a tutorial on how to make a webbrowser with the winsock control, or the winsock dll. hehe. However i think ill make a tutorial on making a quick hex editor in VB. Probably in .net, cause its file system and file manipulation is faster. But ill do it in VB6 just for those who cant get .net
Signature exceeded 75KB.
-
- Posts: 773
- Joined: Tue May 04, 2004 7:14 am
- Location: Uranus
Okay well I made my version a few days ago, and I just took a picture of it to show you .. Tell me what you think. I added links and stuff and some how it I got it to work as a homepage. I put a url in the text box so I think when it loads up it loads that page.
Hey TheKeihatsu good idea, what ever you want to do. I'll still read the tutorial
Hey TheKeihatsu good idea, what ever you want to do. I'll still read the tutorial
Your image cannot exceed 400x200 or 50kb
im working on making a favorites list and a button on it to set homepage,
for the favorites list i want to no how to make it so when i click a button that says favorites itll open a msg box with a list of links but i cant make the in list form i can only make it so there all in same horizontal axis like
1
2
3
4
not like
1234
also how do i make it so without going back into vb i can add things to favorites list, like a text box with a submit button and itll automatically add it to the list can sum1 help.
also once i finish can sum1 convert to exe for me i only have trial
for the favorites list i want to no how to make it so when i click a button that says favorites itll open a msg box with a list of links but i cant make the in list form i can only make it so there all in same horizontal axis like
1
2
3
4
not like
1234
also how do i make it so without going back into vb i can add things to favorites list, like a text box with a submit button and itll automatically add it to the list can sum1 help.
also once i finish can sum1 convert to exe for me i only have trial
-
- Posts: 773
- Joined: Tue May 04, 2004 7:14 am
- Location: Uranus
-
- Posts: 32
- Joined: Mon Jul 26, 2004 4:54 am
- Contact:
-
- Posts: 467
- Joined: Sat Mar 19, 2005 7:59 pm
-
- Posts: 773
- Joined: Tue May 04, 2004 7:14 am
- Location: Uranus
You would need to code a history, I would save it in a txt or some thing and make sure that under *Yourprogram_Load it loads that text file into the drop down box, you may need a timer to automatically save the text every so often. Or how I would code it was everytime you press the Go button, or enter, it creates the text with the address in.
Your image cannot exceed 400x200 or 50kb
-
- Posts: 467
- Joined: Sat Mar 19, 2005 7:59 pm