Steven Low
Active member
- Joined
- Apr 14, 2005
- Messages
- 42
- Programming Experience
- 1-3
Hi Guys
I need help on a validation. I got it to only type number but now I like it to only have 5 numbers and nothing more. How would I do this guys
I need help on a validation. I got it to only type number but now I like it to only have 5 numbers and nothing more. How would I do this guys
VB.NET:
Private Sub tx10_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles tx10.KeyPress
If Not e.KeyChar.IsNumber(e.KeyChar) AndAlso e.KeyChar <> ControlChars.Back Then
e.Handled = True
End If
End Sub