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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eo**************@TK2MSFTNGP02.phx.gbl...
"Christopher Lusardi" <cl********@aol.com> schrieb: Is there any simple way to do this?
Assign the button to the form's 'AcceptButton' property.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>