| View previous topic :: View next topic |
| Author |
Message |
Microsoft Grandmaster Cheater
Reputation: 0
Joined: 01 Dec 2007 Posts: 730 Location: O-('-'Q)
|
Posted: Tue Jun 24, 2008 4:03 pm Post subject: how to Make a web browser in VB6 |
|
|
Steps 1-3
Create a new project, and then go to "Project" on the menu.
Click components as shown in the following image.
user posted image
Find the component "Microsoft Internet Controls," check it, and click "Apply" and then "Close."
user posted image
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.
| Code: | Private Sub cmdback_Click()
WebBrowser1.GoBack
End Sub |
Makes the back button go backwards, pretty much self explanatory.
| Code: | Private Sub Cmdforward_Click()
WebBrowser1.GoForward
End Sub
|
Same concept, except this time the webbrowser goes forward.
| Code: |
Private Sub cmdgo_Click()
WebBrowser1.Navigate (Text1.Text)
End Sub
|
Makes your webbrowser go to the URL in your text box.
| Code: | Private Sub cmdrefresh_Click()
WebBrowser1.Refresh
End Sub
|
Makes your web browser refresh.
| Code: | Private Sub Form_Load()
WebBrowser1.Navigate ("http://forum.cheatengine.org")
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 WebBrowser1_StatusTextChange(ByVal Text As String)
Text1.Text = (WebBrowser1.LocationURL)
Form1.Caption = (WebBrowser1.LocationName)
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.
Hope you enjoy your web browser
~Gatekeeper
NOTE:: Of course I didnt come up with this myself I just put it here so CEF users would be able to find it easier
_________________
Last edited by Microsoft on Wed Jun 25, 2008 5:35 am; edited 1 time in total |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
Microsoft Grandmaster Cheater
Reputation: 0
Joined: 01 Dec 2007 Posts: 730 Location: O-('-'Q)
|
Posted: Wed Jun 25, 2008 5:34 am Post subject: |
|
|
| Wiccaan wrote: | http://www.trap17.com/index.php/how-make-web-browser_t31604.html
Copy-pasted. |
would it matter ill give credits geez
_________________
|
|
| Back to top |
|
 |
Luigi Grandmaster Cheater Supreme
Reputation: 1
Joined: 24 Mar 2008 Posts: 1082
|
Posted: Sat Jun 28, 2008 5:03 pm Post subject: |
|
|
| Instead of a text box, use a combo box.
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6301
|
Posted: Sat Jun 28, 2008 6:13 pm Post subject: |
|
|
| Gatekeeper wrote: | | would it matter ill give credits geez |
Most definitely matters, and to add,,,, this is not the programming section.
|
|
| Back to top |
|
 |
systat Advanced Cheater
Reputation: 0
Joined: 15 Feb 2008 Posts: 54
|
Posted: Mon Jun 30, 2008 1:56 am Post subject: |
|
|
Very easy actually, one click here, other click there, copy/paste, and there it is, your own Web Browser in VB6, only 20 lines of code :p
_________________
uuuuuuuuuuuuu |
|
| Back to top |
|
 |
xX0Reaper0Xx Advanced Cheater
Reputation: 0
Joined: 12 Jun 2007 Posts: 57
|
Posted: Mon Jun 30, 2008 4:02 am Post subject: |
|
|
i find it sad that people need tuts for a Web Browser, a Basic one is probably the easiest thing to code, I've made one in VB6, VB.Net (slightly different coding), C#, C++ and Delphi. And I did it without a tut.
Oh and btw in VB2008 they have included a tut for a Web Browser probably because its so freaking easy
_________________
Definitions:
Leecher - A Noob who steals Files and Posts it somewhere else without credits to the creator.
Noob - A higher form of being that instead of stealing Begs and asks Stupid Questions.
Flamer - Someone who has experience and totally despises noob questions and leechers. |
|
| Back to top |
|
 |
Trow Grandmaster Cheater
Reputation: 2
Joined: 17 Aug 2006 Posts: 957
|
Posted: Mon Jun 30, 2008 4:21 am Post subject: |
|
|
Your code
| Quote: | Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Text1.Text = (WebBrowser1.LocationURL)
Form1.Caption = (WebBrowser1.LocationName)
End Sub |
will show "True" or "False" because you surrounded the output with brackets, which mean "check if true" in VB6.
_________________
Get kidnapped often. |
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Mon Jun 30, 2008 11:40 pm Post subject: |
|
|
| I don't know why, but I hate C & P with or without credits. In my opinion, this isn't a real web browser because it leeches off Internet Explorer.
|
|
| Back to top |
|
 |
AndrewMan Grandmaster Cheater Supreme
Reputation: 0
Joined: 01 Aug 2007 Posts: 1257
|
Posted: Tue Jul 01, 2008 12:46 am Post subject: |
|
|
| nwongfeiying wrote: | | I don't know why, but I hate C & P with or without credits. In my opinion, this isn't a real web browser because it leeches off Internet Explorer. |
Yeah
Basically a different UI. Better off making add-ons for FireFox.
(Although, I did create really nice UI for a browser once, lol)
_________________
|
|
| Back to top |
|
 |
|