This is just off the top of my head, so I don't know whether it would be
useful to you.
The KeyPress event fires on printable characters. You might record the key
press argument in the form's instance data, and inspect it in the KeyUp
event (clear it in the KeyUp event after you inspect it so that it won't
linger for the next keyboard input). If the KeyPress event stored nothing
before KeyUp occurred, you can assume that the key input you're handling was
not printable.
Tom Dacon
Dacon Software Consulting
" **Developer**" <RE*************@a-znet.com> wrote in message
news:ev**************@TK2MSFTNGP12.phx.gbl...
How do I know if the value in a KeyEventArgs is printable?
Basicacally, in KeyUp I'd like to know if the character is printable, as
opposed to say, a backspace.
I suppose I could check KeyValue against some integers which I could get
from an ASCII table.
Isn't there a better way?
Thanks