Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run from the press of a key 1

Status
Not open for further replies.

hilliolouis

Programmer
Jul 22, 2005
51
GB
How do you set a process to run on the press of the enter key, as in using a text box to run its contents when the user presses enter at the end of inputting the data.

Louis Hill
 
Is it something like this you're after?

[tt]Private Sub TxtBox_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Keys.Enter Then
' call your process
End If
End Sub[/tt]

Roy-Vidar
 
yup thanks mate, just say the If e.KeyCode on a pic on microsofts website but it doesnt show where it calls that from

Louis Hill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top