A
Apostolos Doudakmanis
Guest
Hi
I have a form with a MaskedTextBox (txtMaskCode) and some TextBoxes
I use the SelectNextControl to move between the textboxes and MaskedTextBox
But when the cursor is into the MaskedTextBox and press the ENTER, don't move to the next textbox. Also the programm stop to run in debug mode
From all the textboxes and the MaskedTextBox, the property is TabStop=False
Why happened?
Private Sub txtMaskCode_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtMaskCode.KeyPress, txtEponymia.KeyPress
Dim KeyAscii As Short = Asc(e.KeyChar)
Select Case KeyAscii
Case 13
e.Handled = True
SelectNextControl(ActiveControl, True, True, True, True)
KeyAscii = 0
Case 27
e.Handled = True
ExitToOtherControls()
KeyAscii = 0
Case Else
e.Handled = True
End Select
End Sub
Continue reading...
I have a form with a MaskedTextBox (txtMaskCode) and some TextBoxes
I use the SelectNextControl to move between the textboxes and MaskedTextBox
But when the cursor is into the MaskedTextBox and press the ENTER, don't move to the next textbox. Also the programm stop to run in debug mode
From all the textboxes and the MaskedTextBox, the property is TabStop=False
Why happened?
Private Sub txtMaskCode_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtMaskCode.KeyPress, txtEponymia.KeyPress
Dim KeyAscii As Short = Asc(e.KeyChar)
Select Case KeyAscii
Case 13
e.Handled = True
SelectNextControl(ActiveControl, True, True, True, True)
KeyAscii = 0
Case 27
e.Handled = True
ExitToOtherControls()
KeyAscii = 0
Case Else
e.Handled = True
End Select
End Sub
Continue reading...