This is how to using keypress event in Visual Basic VB.NET. For Example below is code that handle “ENTER” keyboard with keyboard code “13“. Replace action with you want to do.
If you want to change the “ENTER” event, replace “13” with others ASCII keyboard code.
If e.KeyChar = Convert.ToChar(13) Then
'Your Action Here...
Catch ex As Exception