SendKeys does not allow for the processing of keys inputted, however it is possible to detect keyboard actions using keydown/keypress events on different objects. The example below demonstrates how.
- Private Sub textBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyDown
-
-
If e.KeyCode == 65 Then
-
' Whatever you wish to do, note you can convert the key code to its ASCII char
-
End If
-
-
End Sub
I hope this helps you with getting key input. Each character has its own decimal value and I'm not sure but I believe you can use
Chr() to convert its decimal value into the ASCII character.
Chris