• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Visual Basic [VB6] Creat your own Web browser

Madd Eye

New Member
Joined
Jan 26, 2008
Messages
13
Reaction score
0
1. Introduction
2. Step 1
Step 2
Step 3
Step 4


1. Introduction

Have you ever wanted to write your own web browser but thought it was too hard? Well in this tutorial I will be showing you step by step on how to build your very own web browser in Visual Basic.
When Microsoft released Microsoft Internet Explorer, they distributed the SHDOCVW.DLL with it. This is the main library for exporting the Internet Explorer viewer into your programs. Visual Basic helps you to insert this control with a few easy steps




Step 1


Open Visual Basic, and Press CTRL+T or go to the Project Menu -> Components. When the Components dialog pops-up scroll down to the Microsoft Internet Controls in the Controls section, select it and press OK.

pic1.gif


If you did the step above correctly, you should see a new icon on your Toolbox:
pic2.gif



Step 2: Setting up the interface


In this step, you would need to add the following controls to the form:
• 4 command buttons and name them: cmdBack, cmdForward,
cmdStop, cmdHome
• 1 label control and name it: lbCaption
• 1 combobox control and name it: cboURL
• The webbrowser control you've just added, and name it: wWeb

Your form will now look something like this:

pic3.gif


You've just finished the basic interface for your web browser application. Remember, you can always go beyond this by using the Toolbar control to make it look nicer!


Step 3: The Coding!

Now that you've finished the user interface for your web browser, comes the hard part, you have to write codes for your browser to function properly.

Open the code for your web browser form and follow the following steps.

In the cmdBack_Click() event, put in this code:
wweb.GoBack
the GoBack method makes the web browser control to go back to the previous page.

In the cmdForward_Click() event, put in this code:
wWeb.GoForward
The GoForward method makes the web browser control to go forward to another page.

In the cmdStop_Click() event, put in this code:
wWeb.Stop
The Stop method makes the web browser control stop whatever it's doing.

In the cmdHome_Click() event, put in this code:
wWeb.GoHome
The Home method makes your web browser control navigate back to the webpage that you set as home in the Internet Explorer Option.

In the cboURL_KeyDown() event, put in this code
If KeyCode = vbKeyReturn Then
wWeb.Navigate cboURL.Text
End If

That code will make the web browser control navigate to the URL you that you specified in the cboURL whenever you press the return key while typing in the combo box.


Step4: Congratulations!

You've now created your very own web browser. Tune in for the next edition of the Web Browser control tutorial for information on how to add a progress bar, status text, and advanced controlling of the web browser control.

Final product:

pic4otlandnz1.gif


If you would like to try download a ready version of this tutorial please Click here


Have Fun with this Tut :p
 
Last edited:
Hahaha, damn! This is cool, probably gonna try it later on, when I've found out where I can find Visual Basic... -.- been searching everywhere...
 
LOL NOT 150-500€ haha :p

i got it free in a competition in denmark... but i dont think it costs 150-500€
 
I have done a web browser in Visual basic.NET before ;p but only with 1 button named "Go" :p
 
• 4 command buttons and name them: cmdBack, cmdForward,
cmdStop, cmdHome
• 1 label control and name it: lbCaption
• 1 combobox control and name it: cboURL
• The webbrowser control you've just added, and name it: wWeb

How to do that, with the commands?
 
WebBrowser1.Navigate Adress

Easier one.

I made my own one with my favorite button links :) Now I wonder how I add images? When I click the Icon there isn't a image except white :(
 
Last edited:
Still, this is basically just a simplified Microsoft browser (basically it's far from "your own" web browser)
 
VB6 is great. Just followed your little tutorial and made it, I like it :p Been learning VB in school O And no its not 100 dollars, they aren't releasing it anymore I believe, but you can probably buy it off someone for 5 bucks. The VB Express 2005 is way different I don't want it :S


Or theres another evil way to get VB 6 that will not be mentioned here :D
 
Last edited:
With This Tutorial I Can Create My Account Pag For My Ot Server 7.6?

No, this tutorial just teaches you how to create a web browser based on Internet Explorer. Read the first post more carefully next time please!
 
This isnt a own Webbrowser. its Internet Explorer.
Its just simply edited with Visual basic 6....
 
Back
Top