How To Associate An Enter Key In TextBox To A Specific Button

  • Thread starter Thread starter Christopher Lusardi
  • Start date Start date
Private Sub Textbox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles Textbox1.KeyDown

If e.KeyCode = Keys.Enter Then Button1.PerformClick()

End Sub



HTH

-Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top