| View previous topic :: View next topic |
| Author |
Message |
Lyfa The Lonely Man
Reputation: 12
Joined: 02 Nov 2008 Posts: 743
|
Posted: Sun Apr 19, 2009 2:45 pm Post subject: How to make a web browser in VB6 |
|
|
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.
Find the component "Microsoft Internet Controls," check it, and click "Apply" and then "OK"
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.
Makes the back button go backwards, pretty much self explanatory.
| Code: | Private Sub cmdback_Click()
WebBrowser1.GoBack
End Sub |
Same concept, except this time the webbrowser goes forward.
| Code: | Private Sub Cmdforward_Click()
WebBrowser1.GoForward
End Sub |
Makes your webbrowser go to the URL in your text box.
| Code: | Private Sub cmdgo_Click()
WebBrowser1.Navigate (Text1.Text)
End Sub |
Makes your web browser refresh.
| Code: | Private Sub cmdrefresh_Click()
WebBrowser1.Refresh
End Sub |
The URL shows your homepage, change it to http://google.com or whatever your usual homepage you would like to be.
| Code: | Private Sub Form_Load()
WebBrowser1.Navigate ("http://www.google.com")
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.
| Code: | Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Text1.Text = (WebBrowser1.LocationURL)
Form1.Caption = (WebBrowser1.LocationName)
End Sub |
There you are, a tutorial on how to make a browser, thanks for your time .
_________________
|
|
| Back to top |
|
 |
pkyourface Master Cheater
Reputation: 0
Joined: 26 Dec 2006 Posts: 252
|
|
| Back to top |
|
 |
Lyfa The Lonely Man
Reputation: 12
Joined: 02 Nov 2008 Posts: 743
|
Posted: Sun Apr 19, 2009 3:53 pm Post subject: |
|
|
| pkyourface wrote: | | I'm a gay fag. |
Wow...nice way to come out of the closet...
_________________
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Mon Apr 20, 2009 5:04 am Post subject: |
|
|
You only just use the webcontrol.. Does it make it any more vb6ish? I'd like to see you make one without a finnished webbrowser component. Becuase vb6 ain't a scripting language.
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
Lyfa The Lonely Man
Reputation: 12
Joined: 02 Nov 2008 Posts: 743
|
Posted: Mon Apr 20, 2009 1:20 pm Post subject: |
|
|
| wallantia wrote: | | You only just use the webcontrol.. Does it make it any more vb6ish? I'd like to see you make one without a finnished webbrowser component. Becuase vb6 ain't a scripting language. |
| Cheat Engine Forums wrote: | General programming
Forum for posting questions and answers about programming. Delphi, C, Java, Assembler, BF, Cobol, whatever... |
_________________
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Mon Apr 20, 2009 10:04 pm Post subject: |
|
|
give credit where credit is due and people wont be angry
| Quote: | | Wow...nice way to come out of the closet... |
AHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA, so funny!
_________________
|
|
| Back to top |
|
 |
|