How to recognize function keys?

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
 
J

Jeff Johnson

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?
 
H

Helmut Giese

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
 
J

Jeff Johnson

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....
 
H

Helmut Giese

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top