Need code for button

Posts 1–4 of 4 · Page 1 of 1
Need code for button
Hi.
Im makin a browser. Made one in VB6 but it looked like a browser from the past.
Now I went doing on in VB 10, with a newer inteface and I got everything right except the Go button. Dont know why it dindt work.

So, I wanna know if anyone knows the code to use the Enter key instead of the Go button.
And if u know the code for Go button post awell just to know if I am doin things right.
Thanks in advance!
for enter, use keydown event.

Code:
    Private Sub Textbox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Textbox1.KeyDown
        If e.KeyCode = Keys.Enter Then
            'do events
WebBrowser1.Navigate(Textbox1.text) 'go to url
        End If
    End Sub
or if your lazy...add this to your form1_load event
(on the basis that your go button is called "Btngo"
Code:
Me.AcceptButton = Btngo
Ok ill try that thx a lot folks!
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?