Hello,
For a certain form I want the enter key to perform exactly the same action as the tab key. I thought I would be able to do something like this:
However this doesn't work because the event is not fires when I press the enter key when the cursor is in a text box or other control. I want the cursor to move to the control with the next tab index when pressing enter but I don't know which event I need to use here.
For a certain form I want the enter key to perform exactly the same action as the tab key. I thought I would be able to do something like this:
Code:
Private Sub frmAfsluiten_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.Enter Then
System.Windows.Forms.SendKeys.Send(Keys.Tab)
End If
End Sub
However this doesn't work because the event is not fires when I press the enter key when the cursor is in a text box or other control. I want the cursor to move to the control with the next tab index when pressing enter but I don't know which event I need to use here.