ProcessCmdKey method processes a command key.
Example:
Use ProcessCmdKey to catch arrow keys (arrow keys not trigger VB NET in form events)
Solution:
Use ProcessCmdKey to catch arrow keys (arrow keys not trigger VB NET in form events)
Solution:
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keydata As Keys) As Boolean
If keydata = Keys.Right Or keydata = Keys.Left Or keydata = Keys.Up Or keydata = Keys.Down ThenOnKeyDown(New KeyEventArgs(keydata))
ProcessCmdKey = True
Else
ProcessCmdKey = MyBase.ProcessCmdKey(msg, keydata)
End If
End Function
Private Sub RunForm_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.Right ThenEnd If
End Sub