How to Change Web Browser Home Page in VB.Net

0
48

This Tutorial is all about How to Change Web Browser Home Page in VB.Net. In this tutorial you will be able to Change Web Browser Home Page in VB.Net. So lets get Started:

  • First is open the Visual Basic, Select File on the menu, then click New and create a new project.

  • Then a New Project Dialog will appear. You can rename your project, depending on what you like to name it. After that click OK

  • After that, design your form like this just like what I’ve shown you below.
    Add a Webbrowser, a Button to the form.
  • Then, Click on Project, then click on your project properties  (Last item of the menu).
    Click on Settings tab,
  • Under Name add the word “Home”, and add a url under Value “http://www.google.com”
  • After that, Add this code to the Go to Homepage Button.
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2. WebBrowser1.Navigate(My.Settings.Home)
    3. End Sub
  • Add this code to the Change Home Page Button.
    1. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    2. Dim response As Object
    3. response = InputBox("Please Enter Home Page URL", "Webbrowser", My.Settings.Home)
    4. My.Settings.Home = response
    5. My.Settings.Save()End Sub
  • Finally, Click F5 to run the program.
    Output:

 

If you have any comments or suggestions about on How to Change Web Browser Home Page in VB.Net please feel free to contact our webpage.

Download How to Change Web Browser Home Page in VB.Net Here

Other Articles Readers might read:

 

 

 

Facebook Comments
(Visited 52 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here