[Solved] Select item from ComboBox to open web links on WebBrowser?


Try this…

Public Class Form1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Select Case ComboBox1.SelectedItem
        Case "Please Select"
            MsgBox("ERROR - No selection made in dropdown box!")
        Case "Google"
            WebBrowser1.Navigate("www.google.com")
        Case "Microsoft"
            WebBrowser1.Navigate("www.microsoft.com")
        Case "Stack Overflow"
            WebBrowser1.Navigate("www.stackoverflow.com")
    End Select
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    '
    ComboBox1.Items.Add("Please Select")
    ComboBox1.Items.Add("Google")
    ComboBox1.Items.Add("Microsoft")
    ComboBox1.Items.Add("Stack Overflow")
    ComboBox1.SelectedIndex = 0
    '
End Sub

Private Sub WebBrowser1_Navigating(sender As Object, e As WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
    ProgressBar1.Visible = True
    With ProgressBar1
        .Minimum = 0
        .Maximum = 50
        .Step = 5
    End With
    For index As Integer = 0 To 50 Step 5
        ProgressBar1.Value = index
        System.Threading.Thread.Sleep(35)
    Next
End Sub

End Class

enter image description here

2

solved Select item from ComboBox to open web links on WebBrowser?