Visual basic noobs - Basic web browser

This is my first tutorial in the Visual basic noobs series. So lets get this started!

First, open your program for visual basic, it can be visual basic express or visual studio.


After it finishes loading, you should see something like this. (It varies based on what program you have.)


Next, you will need to hit new project.

Name your project.
Now, here is where the fun starts. Wait for it to load and viola! The designer window.
Now, we will name our form/window what we want the program to be named.
To do this, we will need to click on the window that it generates, called Form1. Then we
will look at the properties tab (bottom right by default) and we will name it.
Now, put a icon in. It must be a ico file, recommended that you find one on iconfinder
Good job, now we will start the designing and coding process.
Now, go into the toolbox. Click and hold on toolstrip, drag it over the form and release.
The toolstrip has been inserted to the form. This is where the back, forward, go, etc. will go.
Click on the image to see the animation of me inserting a toolstrip.
Now, we will start adding buttons. Click on the little window with a spark button to create buttons.
Click on the image to see the animation of me inserting buttons.
Ok, now we will come back to the toolbar later. It is time to put the major part of the web browser. The browser control.
Click the image to view the animation of me inserting a browser control
Good job, now back to the toolbar. We will add a textbox and change those images to text.
Click the image to view the animation of me inserting and placing the textbox.
Here is a video of me making the buttons have text.
Now to code these buttons to actually do something.

Double click on the back button, and insert this code.

                                     
  webbrowser1.goback  
                                     

Double click on the forward button, and insert this code.

                                         .
  webbrowser1.goforward  
                                          

Double click on the stop button, and insert this code.

                                
  webbrowser1.stop  
                                

Double click on the refresh button, and insert this code.

                                    
  webbrowser1.refresh  
                                    

Double click on the go button, and insert this code.

                                                            
  webbrowser1.navigate(textbox1.text)  
                                                            

Yay! You have completed the tutorial!
Now hit the debug button (The play button) and your program will run!
Give yourself a pat on the back, because you made it through lesson 1 of VB.NET Noobs.

Post a Comment

Note: Only a member of this blog may post a comment.