Input Control

Delegat

New member
Local time
Today, 05:54
Joined
Oct 17, 2010
Messages
2
How can I prohibit user from entering non-letters in a text field

(one ( I think bad) approach is to define mask as ???????????????????????????????????????... ).
 
You can use the KeyPress or Keydown event of the control to test which key has been pressed.
 
Use the Change Event of the text box to test the ASCII code of the character entered if it is between 65 to 95 then it is a letter. Now, is a ' e.g Tom's or a space permitted in your text box?
 

Users who are viewing this thread

Back
Top Bottom