|
|
|
|
![]() ![]() |
Dec 25 2005, 06:33 PM
Post
#1
|
|
|
{([Mod])} ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 710 Joined: 30-October 04 From: Texas Member No.: 2,058 |
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 "Close." ![]() 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://thyelite.com") 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. There you are, a tutorial on how to make a browser, thanks for your time |
|
|
|
Dec 25 2005, 07:00 PM
Post
#2
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 172 Joined: 18-August 05 Member No.: 10,836 |
yeah... i made that or something similar long ago... but it was slow as hell... i was loading google for an half an hour
That stuff could be used for spoofing your browser id... I remember ther where a way to build a web browser in php... il post it if ifind it. |
|
|
|
Dec 25 2005, 07:34 PM
Post
#3
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 69 Joined: 4-December 05 Member No.: 15,309 |
Hmm...Interesting stuff. I'll have to try this out when I get back to school from the holiday break, as I don't have VB6 on this computer.
|
|
|
|
Dec 25 2005, 07:57 PM
Post
#4
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,205 Joined: 25-March 05 Member No.: 4,883 |
It's also possible to do it with VB.NET. The internet browser created with Visual Studio actually takes the properties and settings configured for the Internet Explorer (IE) browser on your computer.
So basically, in other words, you have created a customised IE rather than your own browser. |
|
|
|
Dec 25 2005, 09:58 PM
Post
#5
|
|
|
Never alone with Christ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 647 Joined: 22-July 05 Member No.: 9,713 |
Awesome, but I would worry about it messing with the integrity of your security. The main problem I also see with this is the fact that it could also make it run slower than usual. Is there a way to be able to switch between using the regular browser and the one you create? Overall it IS a good idea though and I think this is a great post. Thanks for the info and if I ever get the program I will try it.
|
|
|
|
Dec 25 2005, 10:14 PM
Post
#6
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 203 Joined: 2-June 05 From: Why would you want to know? Member No.: 7,778 |
I know how to make a web browser in Visual Basic. Visual Basic is like the most easy language. Delphi is also easy. When you make your own browser and open a new window, it opens it in IE instead. There is probably some sort of code to make it so it opens it a new window in your program but I don't know what the code is.
Hint: Use Google. |
|
|
|
Dec 25 2005, 11:18 PM
Post
#7
|
|
|
Moderator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,325 Joined: 8-March 05 From: Mawson, Antarctica Member No.: 4,254 |
Yeah, a web browser needs a LOT more code than that. What you're doing, like Inspiron said, is making your very own custom Internet Explorer. It's like taking the source code of Firefox and modifying it to your likings...except less complicated.
|
|
|
|
Dec 26 2005, 12:35 AM
Post
#8
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 182 Joined: 27-August 05 Member No.: 11,179 |
YAYA I'v been looking everywhere for this. So is firefox made in visual basic lol. I though it.
Great tutorial. Really helped! thanks. |
|
|
|
Dec 26 2005, 03:36 PM
Post
#9
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,205 Joined: 25-March 05 Member No.: 4,883 |
Firefox is not created with Visual Basic however. Rather it's impossible to believe that Firefox is created with Visual Basic because Microsoft owns Visual Basic and this language isn't free. So if Firefox is created with a paid programming language, then why it would be distributed free?
I'm not sure but I have a feeling that Firefox is created with C++ language.. |