keydown event double

  • Thread starter Thread starter Phil
  • Start date Start date
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
 
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
 
Back
Top