Limit input to Text Box

  • Thread starter Thread starter PosseJohn
  • Start date Start date
P

PosseJohn

I want to limit the keys available to user to make input to a numeric field.

I want to do this be traping the KEYDOWN event.

If the user presses a key that I don't want them to use, how do I cancel the
KEYDOWN? Do I set the keycode to false?
 
PosseJohn said:
I want to limit the keys available to user to make input to a numeric
field.

I want to do this be traping the KEYDOWN event.

If the user presses a key that I don't want them to use, how do I cancel
the
KEYDOWN? Do I set the keycode to false?

http://www.smccall.demon.co.uk/Keyboard.htm#KeyNumeric

I recommend setting the KeyCode to 0, not False, as this implies that the
value is of boolean type, whereas it's actually an integer.
 
Back
Top