PDA

Click to See Complete Forum and Search --> : Tutorial - Very Simple Web Browser (Beginners)


Hlinzi
Oct 19th, 2008, 09:33 AM
Hi welcome to my tutorial.
This is a tutorial for beginners.
I will teach you how to make a very simple Web browser.
This tutorial is for windows forms.
--------------------------------------------------------
The idea for Home is by me ( Hlinzi )
Start off by designing you're Web Browser.
What you need is

- 2 Text Boxes ( 1 For Go (Gotextbox) 1 For Home (Hometextbox) )
- 6 Buttons ( Go, Home, Forward, Back, Stop, Refresh )
- 1 Webbrowser ( Webbrowser1 )
- 1 Status Strip
- 1 StatusStrip Label
- 1 StatusStrip Progress Bar

Okay.
When you've put you're buttons together, double click Go button and write in this code:
Webbrowser1.Navigate(Gotextbox.text)
Then go back to design and double click Home, Now write in this code:
Webbrowser1.Navigate(Hometextbox.text)
Do this over again, here are the codes for the buttons:
---------
Forward:
Webbrowser1.GoForward
---------
Back:
Webbrowser1.GoBack
---------
Stop:
Webbroser1.Stop
---------
Refresh:
Webbrowser1.Refresh
---------
StatusStrip Label & Progress Bar
For this you need to double click the WebBrowser and change the Declaration to ProgressChanged.
ToolStripProgressBar1.Maximum = e.MaximumProgress
ToolStripProgressBar1.Value = e.CurrentProgress
ToolStripStatusLabel1.Text = "Progress: " & e.CurrentProgress
---------

Thank you for reading my tutorial
If this helped you, Please rate :)
This is my Biggest Post So Far! :D

Hlinzi
Oct 25th, 2008, 08:15 AM
I don't know, ill try

Hlinzi
Oct 25th, 2008, 08:49 AM
Hmm I'm sorry. It's almost not possible. You can't tell what's an ad and what's not. Anyway ill add a progress bar here :P

Hlinzi
Oct 25th, 2008, 09:15 AM
For a ad blocker you could do this:
Go Button_Click
If TextBox1.Text = "www.youtube.com" then
Msgbox("Blocked Site")
Textbox1.Text = ""
End If

And then you could change it and maybe add groupbox with option of changing blocked sites, lets imagine i have a groupbox with 1 Textbox which is TextBox10
If TextBox1.Text = TextBox10.Text Then
Msgbox("Blocked Site")
TextBox1.Text = ""
End If

Hlinzi
Oct 25th, 2008, 09:16 AM
But i wouldn't call it an ad blocker ;/

Pac_741
Dec 13th, 2008, 05:39 PM
I do know how to block a desire web page using the web browser control.

First, Create a blocked web page (the page that will be displayed if the page is blocked)

Second, check if the web page that is going to be blocked is in some sort of blocked web page list, or which ever way you want to do it.

Third, then display the blocked page on the web browser control.

This should be very easy to do, I won't post any code, so you can investigate the web browser control more deeply.

younes_04
Feb 15th, 2011, 06:30 AM
oh god!
thank you very much ,that's exactly the way of tutorials i need as beginner ,in other places i just find codes but lost in putting objects , that's so accurate ,
thank youuuuuuuuuuu:thumb:

MarMan
Feb 15th, 2011, 08:41 AM
Make one if you really want to. Don't if you do not wish to. * Note: The author of a tutorial sometimes learns things too!

vandallist
Mar 7th, 2011, 02:55 AM
i needed this for a youtube thing i am doing :D