Support Forums
Create a simplistic webbrowser - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: Create a simplistic webbrowser (/showthread.php?tid=5925)

Pages: 1 2 3


Create a simplistic webbrowser - hockeynut35 - 04-09-2010

Create a Web browser with VB

Materials :

1 Toolstrip + ToolStrip Controls, 1 WebBrowser.




1)

drag a toolstrip from the toolbox onto the form. Make sure that the Grip Visibility is set to Hidden.

[Image: 28kukqv.png]

2)
Time to add the controls!

Needed:
6 ToolStripButtons, 1 ToolStripLabel, and 1 ToolStripTextBox
Naming the buttons

Name the first button "Back"

Name the second button "forward"

Name the third "refresh"

Name the fourth "stop"

Name the fifth "home"

And finally name the last "GO".


The go button alignment property must be set to "right".

We can now set "DisplayStyle" to "Image".
Set the images you want for the buttons.

Now we must move on and label and the textbox on the toolstrip.

For the "Label" change the "text property" to
Code:
URL
and the name to urlLabel.

Now the textbox will be named url and the text leave empty.


3)

Next drag the WebBrowser Control onto the form.

[Image: 11c9vti.png]


Set the name property of the webbrowser to
Code:
webBrowser


4)

Now for the actual coding part.

Double-Click on the Form and enter this code:
Code:
webBrowser.GoHome().
Double-Click on the Back Button and enter this code:
Code:
webBrowser.GoBack().
Double-Click on the Forward Button and enter this code:
Code:
webBrowser.GoForward().
Double-Click on the Refresh Button and enter this code:
Code:
webBrowser.Refresh().
Double-Click on the Stop Button and enter this code:
Code:
webBrowser.Stop().
Double-Click on the Home Button and enter this code:
Code:
webBrowser.GoHome().
Double-Click on the GO Button and enter this code: webBrowser.Navigate(url.Text).[/code]
Double-Click on the webBrowser and enter this code:
Code:
url.Text = e.Url.ToString().


5) The end result

[Image: ws1aja.png]


This is a very basic tutorial! Add more functions to your web browser such as tabs and history as you learn and become more advanced!


[/align]


RE: Create a simplistic webbrowser - Avery - 04-09-2010

Looks great, props on the guide very simple and easy to follow and straight to the point.

The buttons for the back and forward look 10x better than Google Chromes.


RE: Create a simplistic webbrowser - hockeynut35 - 04-09-2010

(04-09-2010, 01:15 PM)Avery Wrote: Looks great, props on the guide very simple and easy to follow and straight to the point.

The buttons for the back and forward look 10x better than Google Chromes.

Thanks Smile. I'm currently using a heavily modified version of this browser.


RE: Create a simplistic webbrowser - Avery - 04-09-2010

(04-09-2010, 01:16 PM)hockeynut35 Wrote: Thanks Smile. I'm currently using a heavily modified version of this browser.


Of Google Chrome?

A Picture would be lovely Victoire


RE: Create a simplistic webbrowser - Common - 04-09-2010

(04-09-2010, 01:16 PM)hockeynut35 Wrote: Thanks Smile. I'm currently using a heavily modified version of this browser.

What kind of features does it have? Did you make it yourself?


RE: Create a simplistic webbrowser - hockeynut35 - 04-09-2010

(04-09-2010, 02:09 PM)Common Wrote: What kind of features does it have? Did you make it yourself?


I just added:

Bookmarks, Favorites, History, Home shortcut, Time on sidebar.


All of those codes can be found online Big Grin


RE: Create a simplistic webbrowser - Silver - 04-09-2010

Wow, that actually is extremely simple. Nice job Thumbsup.


RE: Create a simplistic webbrowser - Common - 04-09-2010

(04-09-2010, 02:11 PM)hockeynut35 Wrote: I just added:

Bookmarks, Favorites, History, Home shortcut, Time on sidebar.


All of those codes can be found online Big Grin

Oh yeah, that's true. I might do that actually, which would make it more personal.

Thanks for the tutorial man.


RE: Create a simplistic webbrowser - Avery - 04-09-2010

(04-09-2010, 02:11 PM)hockeynut35 Wrote: I just added:

Bookmarks, Favorites, History, Home shortcut, Time on sidebar.


All of those codes can be found online Big Grin

Oh I seen a few but all stupid and plain lol.


RE: Create a simplistic webbrowser - hockeynut35 - 04-09-2010

Well then just find a tut to teach you yo spiff It up