I am working on a keyboard teaching aid similar to mavis beacon. With the following code i am able to detect if the enter key is pressed on the keyboard.
If e.KeyChar = Microsoft.VisualBasic.ChrW(keys.enter) Then
MsgBox("Enter key is pressed")
End If
but what i want to do is that i want to make the keyword "keys.enter" to become a variable name so that the whole code can be called upon as a subroutine to handle all types of letter being pressed by the user so that i dont have to repeat the whole code for the keys needed. Thanks in advance