Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Textbox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles Textbox1.KeyPress
- If e.KeyChar = "."c Then
- e.Handled = (CType(sender, TextBox).Text.IndexOf("."c) <> -1)
- ElseIf e.KeyChar <> ControlChars.Back Then
- e.Handled = ("0123456789".IndexOf(e.KeyChar) = -1)
- End If
- End Sub
Add Comment
Please, Sign In to add comment