0
Private Sub Refresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Refresh.Click
        If (AddressBar.Text.Contains("")) Then
            WebBrowser.Refresh()
        ElseIf (AddressBar.Text.Contains(".com") Or AddressBar.Text.Contains(".info") Or AddressBar.Text.Contains(".asia") Or AddressBar.Text.Contains(".aero") Or AddressBar.Text.Contains(".biz") Or AddressBar.Text.Contains(".cat") Or AddressBar.Text.Contains(".coop") Or AddressBar.Text.Contains(".int") Or AddressBar.Text.Contains(".jobs") Or AddressBar.Text.Contains(".mobi") Or AddressBar.Text.Contains(".museum") Or AddressBar.Text.Contains(".name") Or AddressBar.Text.Contains(".net") Or AddressBar.Text.Contains(".org") Or AddressBar.Text.Contains(".post") Or AddressBar.Text.Contains(".pro") Or AddressBar.Text.Contains(".tel") Or AddressBar.Text.Contains(".travel") Or AddressBar.Text.Contains(".xxx")) Then
            WebBrowser.Navigate(AddressBar.Text)
        Else
            WebBrowser.Navigate("www.google.com/search?q=" & AddressBar.Text)
        End If
    End Sub

This is the code I made to navigate to a web page, search or refresh. Yet when I run the program and i type in the combobox nothing happens.

2
Contributors
1
Reply
4
Views
4 Years
Discussion Span
Last Post by tinstaafl
0

The code you're showing is from a click event. It won't run unless you click Refresh. Is the AddressBar the combobox? If so use the .SelectedItem.Text property.

Edited by tinstaafl

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.