Controlling the keypress event by letting the user input only numbers.
This code let the user input only the numbers and backspace not the characters / letters.
Select Case e.KeyChar
Case CChar("0") To CChar("9"), CChar("."), ControlChars.Back
e.Handled = False
Case ControlChars.Cr
txtPrice.Focus()
e.Handled = False
Case Else
e.Handled = True
End Select
follow this link for the sample program...
http://www.missupload.com/t1cuuf31d9ue/ProExer3.exe.html
Wednesday, October 21, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment