Hi
How can I make this work in KeyPress when I use backspace I can not remove minus sign and fyrst 2 number = 01-
Regards
Sigster
How can I make this work in KeyPress when I use backspace I can not remove minus sign and fyrst 2 number = 01-
VB.NET:
If Not (Char.IsDigit(e.KeyChar) Or e.KeyChar = "-") And Not Char.IsControl(e.KeyChar) Then
e.Handled = True
End If
If Txt_number.TextLength = 2 Then
Txt_number.Text = Txt_number.Text + "-"
Txt_number.SelectionStart = Len(Txt_number.Text)
End If
Regards
Sigster