Catching PageUp and PageDown

  • Thread starter Thread starter gazza670128
  • Start date Start date
G

gazza670128

Hi,

I have a form and want to detect a user pressing pageup or pagedown.
These events dont seem to be captured by KeyPress or anything like
that.

Is there an easy way to do this?
 
Hi,

I have a form and want to detect a user pressing pageup or pagedown.
These events dont seem to be captured by KeyPress or anything like
that.

Is there an easy way to do this?

OK I answer my own question, KeyPress does not detect pgup or pgdwn
but KeyDown does (I wonder why this is?)
So I can just use KeyDown
 
gazza670128 said:
OK I answer my own question, KeyPress does not detect pgup or pgdwn
but KeyDown does (I wonder why this is?)
So I can just use KeyDown

KeyPress and KeyDown are two completely different kinds of events. It's
unfortunate they have such similar names.

The KeyPress event represents translated character input. If there's
not a Unicode character equivalent to the input, it's not going to show
up in the KeyPress event.

KeyDown represents actual physical key movements. If you need to know
when a particular physical key has been pushed down or released, this is
the event you need to handle.

Pete
 
Peter said:
[...]
KeyDown represents actual physical key movements. If you need to know
when a particular physical key has been pushed down or released, this is
the event you need to handle.

Er, I meant to mention the KeyUp event in the above paragraph.
Obviously, the KeyDown event isn't going to tell you when a key is
released. :)
 
Back
Top