CodeClerks

How to create a WebBrowser in Visual Studio (Vb.net)



Enter a reason for deleting this comment

How to create a WebBrowser in Visual Studio (Vb.net)

To create a WebBrowser in Visual Studio (Vb.net) we will need the following components:

4- Buttons
-Set Text of Button1 “Navigate
-Set Text of Button2 “Back
-Set Text of Button3 “Forward
-Set Text of Button4 “Refresh
1- Textbox
1-WebBrowser

You will find all components in “Toolbox” , which is located in left side of Visual Studio.


How to change the text of button?
-Click to that button which you want to change text, and change it from the properties menu.
Properties menu is located in the right side of visual studio.
For example : in this photo I’m changing text of button1 , which is the “Navigate” Button

How to create a WebBrowser in Visual Studio (Vb.net)



After adding all components ,the form will look like as is in photo

How to create a WebBrowser in Visual Studio (Vb.net)


Now we should add the function to each button, to do that simply follow steps below:


1.Double click to "Navigate" button and add this code :

WebBrowser1.Navigate(TextBox1.Text)



2.Double click to “Back” button and add this code:
WebBrowser1.GoBack()


3.Double click to “Forward” button and add this code:
WebBrowser1.GoForward()


4.Double click to “Refresh” button and add this code:
WebBrowser1.Refresh()



5. Click "Start" to run the software

How to create a WebBrowser in Visual Studio (Vb.net)



WebBrowser in Action....

How to create a WebBrowser in Visual Studio (Vb.net)



Happy Coding How to create a WebBrowser in Visual Studio (Vb.net)

Comments

Please login or sign up to leave a comment

Join