Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub TextBox1_PreviewTextInput(ByVal sender As Object, ByVal e As System.Windows.Input.TextCompositionEventArgs) Handles TextBox1.PreviewTextInput
- Dim Character As Char = Convert.ToChar(e.Text)
- If Char.IsDigit(Character) Then
- e.Handled = False
- ElseIf Char.IsLetter(Character) And UCase(Character) = Character Then
- e.Handled = False
- Else
- e.Handled = True
- End If
- End Sub
Add Comment
Please, Sign In to add comment