I am developing a Windows Forms application in VB.NET. I assigned UP and DOWN Arrow keys as Hot keys for some Buttons. I am handling them in KeyUP event as follows:
Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.Up Then
If e.KeyCode = Keys.Down Then
When I press UP or DOWN keys the event is firing but the focus is moving to next or previous control in the Form according to the Tab sequence. How can I prevent moving focus from One control to another control when UP and DOWN arrows pressed.