I hope someone has run into this before and has a solution.
I have a Windows Form that contains several textboxes and comboboxes. I want the user to be able to quickly navigate through the form, so pressing ENTER in each control skips to the next control. Everything works fine, except for the one numericupdown control I have. It works properly (focus is shifted on ENTER) but it emits a DING every time, as though the keypress wasn't being handled and the ENTER was being passed to the control.
I know this will be quite annoying to the user.
Here's the code I'm using. It seems to work for everything else:
Any help would be greatly appreciated.
jrl
I have a Windows Form that contains several textboxes and comboboxes. I want the user to be able to quickly navigate through the form, so pressing ENTER in each control skips to the next control. Everything works fine, except for the one numericupdown control I have. It works properly (focus is shifted on ENTER) but it emits a DING every time, as though the keypress wasn't being handled and the ENTER was being passed to the control.
I know this will be quite annoying to the user.
Here's the code I'm using. It seems to work for everything else:
Code:
Private Sub nudQuan_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles nudQuan.KeyDown
bKeyHandled = False
If e.KeyCode = 13 Then
bKeyHandled = True
txtLocation.Focus()
End If
End Sub
Private Sub nudQuan_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles nudQuan.KeyPress
e.Handled = True
End Sub
Any help would be greatly appreciated.
jrl