Private Sub NumberValidation(sender As Object, e As KeyPressEventArgs) If (e.KeyChar >= 48 AndAlso e.KeyChar <= 57) OrElse e.KeyChar = 8 Then e.Handled = False Else e.Handled = True End If End Sub
If (e.KeyChar >= 48 And e.KeyChar <= 57) Or e.KeyChar = 8 Then e.Handled = False Else e.Handled = True End If
If Asc(e.KeyChar) >= 48 And Asc(e.KeyChar) <= 57 Or Asc(e.KeyChar) = 8 Then e.Handled = False Else e.Handled = True End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)