keydown event double

P

Phil

Hi all,

I have a form that does stuff when the user presses the
function keys, F1 through F12. Unfortunately Windows also
does stuff when those keys are pressed. For example if
the user presses "F1" two things will happen: the form
function will run, then Windows help will open.

How do I disable the built in function of the function
keys? Can I do it only for that form?

Thanks,
Phil
 
G

Guest

After 2 painful days of endless searching through articles
that aren't really relevant to the problem, this is the
solution I found, right in the damn KeyDown event help:

"To handle keyboard events only at the form level and
prevent controls from receiving keyboard events, set the
KeyAscii argument to 0 in the form's KeyPress event
procedure, and set the KeyCode argument to 0 in the form's
KeyDown and KeyUp event procedures."

This also prevents the function key special events from
happening.

CHeers,
Phil
 

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