then i used combobox keypress event instead of textbox
example:
Private Sub cboAddress_KeyPress(ByVal sender As System.Object, ByVal e
As System.Windows.Forms.KeyPressEventArgs) Handles cboAddress.KeyPress
If Asc(e.KeyChar) = Keys.Enter Then
Dim bFound As Boolean
bFound = False
For i As Integer = 0 To cboAddress.Items.Count - 1
If cboAddress.Items(i) = "http://" & cboAddress.Text Then
bFound = True
Exit For
End If
Next
If bFound = False Then
cboAddress.Text = "http://" & cboAddress.Text.ToString
End If
AxWebBrowser1.Navigate(cboAddress.Text)
End If
End Sub
regards
rpgfreak wrote:
I have a textbox where u have to input an URL and when u press on a "GO"
button, my browser window navigates to the URL, but if the textbox is in
focus and I finish typing the URL, and then press Enter, I want to the
browser to navigate too.
How can I do this? I think it has something to do with e.keypress or
something but I'm not sure...
Please help me.