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.
Try
If e.KeyChar = Convert.ToChar(13) Then
'Your Action Here...
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try