Hello friends I am Soumya Mahata and today I am going to show you how to make your own web browser in 3 simple steps in Visual Basic 6.
So make your own browser and let me know how you have upgraded it.
Thank you for visiting and keep frequent visiting :)
STEP1: Open your Visual Basic 6.0 program then GOTO File->New Project->Standard EXE
Now you need to add a component which is going to be your browser.
So goto Project-> Components or you can press ctrl+T and from the component list
box add Microsoft Internet Controls and now just drag and draw.
So goto Project-> Components or you can press ctrl+T and from the component list
box add Microsoft Internet Controls and now just drag and draw.
Now add one text box and 3 command button(you may add more button for extra
operations).
Name the textbox as "adrs", GO button as "go",REV button as "rev",FORWARD
button as "forw".
Now your browser is 50% ready and next step is to code and connect the whole component.
STEP2: Suppose you want to navigate or open a specific page when you open your
browser first time.
Then inside the form_load function write:
WebBrowser1.Navigate ("www.google.com")
Now let's write the code for navigating a page you want.So inside go_click() write the
code:
WebBrowser1.Navigate (adrs.Text)
Here is the code for reverse page navigating,inside rev_click() write
WebBrowser1.GoBack
For forwarding write the code, inside forw_click() write
WebBrowser1.GoForward
Now are ready to browse internet.You can update the label of your browser
form if you want,inside WebBrowser1_StatusTextChange() write
adrs.Text = (WebBrowser1.LocationURL)
Form1.Caption = (WebBrowser1.LocationName)
Now your program is 99% complete.
Here is the full code:-
STEP3: Last step is to save your project and form.Just goto File and save your project.
If you to make it an executable file then goto File->Make <your project name> exe
and create your .exe file.
One last and most impotant thing is you need to write one extra line code for
avoiding script error.
Inside form_load() write WebBrowser1.Silent=True
If you want to refresh your browser page you can add refresh button and write this
code inside that command button "WebBrowser1.Refresh".
So here is the browser:-
You can open any web page you want in most fastest way as there is no code for storing cookies inside it.So enjoy it :)
Thats the end of your project.Here is the browser that i have made:-
Click here to download my browser.Its much faster than any other browser.The only disadvantage is it is a single tabbed browser.
So make your own browser and let me know how you have upgraded it.
Thank you for visiting and keep frequent visiting :)
No comments:
Post a Comment