- Joined
- Apr 21, 2007
- Messages
- 432
- Reaction score
- 1
Hi Coders,
in this tutorial I am going to teach you how to make a easy webbrowser.
Keep in mind that I am Dutch, and only 13 years old, so my English isn't that good.
Download Visual Basic here.
Start Visual Basic and make a new project via File > New Project or press CTRL + N, give the project a name, I prefer the name WebBrowser. Then click on "Ok".
If you did that good, you will see this:
Tail a Panel and a WebBrowser from the Toolbox to Form1, if you can't see the Toolbox press CTRL+ALT+X.
After tailing the Panel and the WebBrowser to Form1, tail a Textbox and a Button to Panel1.
Change the text of Button1 to Go! via the Text-string of the Properties of Button1.
Do the same with the Text-string of Form1, but change there the text-string to WebBrowser or whatever.
It looks a bit messy and little, isn't it?
Let's change that!
Search in the Properties of Panel1 to Dock and change it to Top.
Do the same with the Dock of WebBrowser1, but change it to Fill.
Make Form1 bigger, and tail everthing to a good browser.
Like this:
Start your browser up with pressing F5, type a adress in the textbox and press Go!. You see that there happens nothing, let's change that!
Close the browser.
Click two times on the Go!/Button1 and there will appear a code-screen with the following code in it:
Type between
Now do the same with Button1 but turn the left-part off and the right-part on.
Now start up your browser again with pressing F5, and type in a adress [I take google.com], you see that it works!
You have made your first browser, congratulations!
Now save your project with the Save all Project-option, and then in your project folder, go to bin >> debug/release >> to the .exe file. :]
Hope this helped you with making your first browser.
~Cas
in this tutorial I am going to teach you how to make a easy webbrowser.
Keep in mind that I am Dutch, and only 13 years old, so my English isn't that good.
Download Visual Basic here.
Start Visual Basic and make a new project via File > New Project or press CTRL + N, give the project a name, I prefer the name WebBrowser. Then click on "Ok".
If you did that good, you will see this:
Tail a Panel and a WebBrowser from the Toolbox to Form1, if you can't see the Toolbox press CTRL+ALT+X.
After tailing the Panel and the WebBrowser to Form1, tail a Textbox and a Button to Panel1.
Change the text of Button1 to Go! via the Text-string of the Properties of Button1.
Do the same with the Text-string of Form1, but change there the text-string to WebBrowser or whatever.
It looks a bit messy and little, isn't it?
Let's change that!
Search in the Properties of Panel1 to Dock and change it to Top.
Do the same with the Dock of WebBrowser1, but change it to Fill.
Make Form1 bigger, and tail everthing to a good browser.
Like this:
Start your browser up with pressing F5, type a adress in the textbox and press Go!. You see that there happens nothing, let's change that!
Close the browser.
Click two times on the Go!/Button1 and there will appear a code-screen with the following code in it:
Code:
[LEFT][COLOR=#000000]
[COLOR=royalblue]Public Class[/COLOR] Form1[COLOR=royalblue] Private Sub[/COLOR] Button1_Click([COLOR=royalblue]ByVal [/COLOR]sender [COLOR=royalblue][COLOR=royalblue]As [/COLOR][/COLOR]System.Object, [COLOR=royalblue]ByVal [/COLOR]e [COLOR=royalblue]As [/COLOR]System.EventArgs) [COLOR=royalblue]Handles [/COLOR]Button1.Click[COLOR=royalblue] End Sub[/COLOR][COLOR=royalblue]End Class[/COLOR][/COLOR][/LEFT]
Type between
Private Sub Button1_Click... Handles Button1.Click and End sub:
After that go to the properties of TextBox1 and go to the Anchor-string.
Now you see a kind of cross, where left-part and up-part are selected.
Now select the right-part to.
Code:
[LEFT][COLOR=#000000]
WebBrowser1.navigate (TextBox1.Text)[/COLOR][/LEFT]
After that go to the properties of TextBox1 and go to the Anchor-string.
Now you see a kind of cross, where left-part and up-part are selected.
Now do the same with Button1 but turn the left-part off and the right-part on.
Now start up your browser again with pressing F5, and type in a adress [I take google.com], you see that it works!
You have made your first browser, congratulations!
Now save your project with the Save all Project-option, and then in your project folder, go to bin >> debug/release >> to the .exe file. :]
Hope this helped you with making your first browser.
~Cas

