locked
need help. newbi RRS feed

  • Question

  •  

    hi all, i recently downloaded visual basic and had a go at making a web browser. all went ok, but, when i ran the program in debug mode and typed a web address, nothing happened. i followed the toturial and even watched the video toturial, i did everything right. is this a common problem, i cant see what im doing wrong. and before anyone asks, yes i was connected to the internet.

     

    i would very much welcome any help.

     

    thanks,

    arine.

    Monday, October 27, 2008 9:14 PM

Answers

  • How did you try to do it ? One method might be typing the url into a text or combobox and using a button like this .

     

    Code Snippet

    Private Sub Go_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go_btn.Click

     

    Webbrowser1.Navigate(AddressComboBox.Text)

     

    End Sub

     

     

    Another way would be if you typed a url into the text or combobox and used the enter key to goto the site

     

    Code Snippet

    Private Sub AddressComboBox_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles AddressComboBox.KeyDown

     

    If (e.KeyCode = Keys.Enter) Then

     

    Webbrowser1.Navigate(AddressComboBox.Text)

     

    End If

     

    End Sub

     

     

    If you are using VBE 2008 and want to try a Template for a tabbed webbrowser have a look at this link

     

    http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3992880&SiteID=1

     

    You can always start a new project load the template and see how it was done . It is a simple project no images etc I did it as a starting point for anyone who might want to use it .

    Monday, October 27, 2008 9:22 PM
  •  

    Code Snippet

    Private Sub Go_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go_btn.Click

    Dim _Http As String = "http://"

    Webbrowser1.Navigate("http://" & AddressComboBox.Text)

    End Sub

     

    Monday, October 27, 2008 9:53 PM

All replies

  • How did you try to do it ? One method might be typing the url into a text or combobox and using a button like this .

     

    Code Snippet

    Private Sub Go_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go_btn.Click

     

    Webbrowser1.Navigate(AddressComboBox.Text)

     

    End Sub

     

     

    Another way would be if you typed a url into the text or combobox and used the enter key to goto the site

     

    Code Snippet

    Private Sub AddressComboBox_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles AddressComboBox.KeyDown

     

    If (e.KeyCode = Keys.Enter) Then

     

    Webbrowser1.Navigate(AddressComboBox.Text)

     

    End If

     

    End Sub

     

     

    If you are using VBE 2008 and want to try a Template for a tabbed webbrowser have a look at this link

     

    http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3992880&SiteID=1

     

    You can always start a new project load the template and see how it was done . It is a simple project no images etc I did it as a starting point for anyone who might want to use it .

    Monday, October 27, 2008 9:22 PM
  • i wrote,

     

    WebBrowser1.Navigate(textbox1.text)

     

    it had no problems debugging.

     

    i'll try your method now and tell you if i have any luck. thanks for the reply.

     

    Monday, October 27, 2008 9:47 PM
  • Where did you type the web address? in a textbox? What event of the textbox are you using to call the navigate function?

     

    Please post your code.

     

    A.D.T.

    Monday, October 27, 2008 9:47 PM
  •  

    Code Snippet

    Private Sub Go_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go_btn.Click

    Dim _Http As String = "http://"

    Webbrowser1.Navigate("http://" & AddressComboBox.Text)

    End Sub

     

    Monday, October 27, 2008 9:53 PM
  • Where did you write this? In a button_click event?

     

    A.D.T.

     

    Monday, October 27, 2008 9:59 PM
  • Go away ADT. Just go away.

    Tuesday, November 25, 2008 11:16 PM