I already have KeyPreview
set to true in the form properties
I\'m working on a small program, and I\'m having a problem where it seems
Some controls intercept the arrow keys in the keydown event, but not in the keyup event. One solution is to derive the control class and override ProcessCmdKey:
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 Then
OnKeyDown(New KeyEventArgs(keydata))
ProcessCmdKey = True
Else
ProcessCmdKey = MyBase.ProcessCmdKey(msg, keydata)
End If
End Function
No need to do so much just use Me.KeyPreview = True in load function and use (Handles Me.KeyUp) in Target function for vb.net for arrow keys