Write the codes below on the keyPress event of TextBox to make it accepts only Integer Values.
If e.KeyChar <> ChrW(Keys.Back) Then
If Char.IsNumber(e.KeyChar) = True Then
e.Handled = False
Else
e.Handled = True
End If
End If
If e.KeyChar <> ChrW(Keys.Back) Then
If Char.IsNumber(e.KeyChar) = True Then
e.Handled = False
Else
e.Handled = True
End If
End If
No comments:
Post a Comment