Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
- '97 - 122 = Ascii codes for simple letters
- '65 - 90 = Ascii codes for capital letters
- '48 - 57 = Ascii codes for numbers
- If Asc(e.KeyChar) <> 8 Then
- If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Then
- e.Handled = True
- End If
- End If
- End Sub
Add Comment
Please, Sign In to add comment