How to recognize function keys?

  • Thread starter Thread starter Helmut Giese
  • Start date Start date
H

Helmut Giese

Hello out there,
I need to react to function keys but cannot find any hint in the
online help. There is an entry which talks of e.KeyValue ('e' being
the event), but this must be for a different version than VS 2005.

Anybody kind enough to tell me?
Best regards
Helmut Giese
 
I need to react to function keys but cannot find any hint in the
online help. There is an entry which talks of e.KeyValue ('e' being
the event), but this must be for a different version than VS 2005.

Anybody kind enough to tell me?

You'll only get them in the KeyDown/KeyUp methods, NOT the KeyPress method.
Does that help?
 
You'll only get them in the KeyDown/KeyUp methods, NOT the KeyPress method.
Does that help?
Immediately - and makes me feel a bit silly. Why didn't I think of
this possibility?
Thanks and best regards
Helmut Giese
 
Immediately - and makes me feel a bit silly. Why didn't I think of
this possibility?

It's not silly at all. I rather think it's silly that you DON'T get them in
KeyPress. They ARE keys, after all. But someone decided a long time ago to
associate the WM_CHAR Windows message with an event called KeyPress (instead
of, say, KeyChar) and it's stuck. I don't find the name helpful, nor do most
newbies. It's one of those things you have to learn, rather than being
obvious in itself. Ah, legacy....
 
It's not silly at all. I rather think it's silly that you DON'T get them in
KeyPress. They ARE keys, after all. But someone decided a long time ago to
associate the WM_CHAR Windows message with an event called KeyPress (instead
of, say, KeyChar) and it's stuck. I don't find the name helpful, nor do most
newbies. It's one of those things you have to learn, rather than being
obvious in itself. Ah, legacy....
These are kind words :)
 
Back
Top