Re: Arrow Keys, PageUp, PageDn etc. Not Firing KeyDown Event
- From: Chris <no@xxxxxxxx>
- Date: Wed, 28 Sep 2005 13:31:54 -0400
Phil Galey wrote:
I have a Panel control docked on all sides on a form and the panel control contains a PictureBox. I'm using the KeyDown event of the form to respond to the [+] and [-] keys for resizing the image and the PageUp, PageDn, Home, End, and arrow keys for scrolling the Panel control.
Resizing the image using the [+] and [-] keys works fine, deriving a resized thumbnail from the image and reassigning it to the Image property of the PictureBox. However I'm running into a problem where the scrolling keys are placing the form into a state where it suddenly no longer responds to any keys. KeyDown and KeyPress will no longer fire, unless I quit the program and restart it.
Could there be something else that might be capturing the other keys and altering the functionality of the form? I had placed two buttons on the form and noticed that the arrow keys were toggling the focus between the two buttons, rather than scrolling the Panel.
Question: How can I get the "scrolling" keys to fire the KeyDown event and prevent the form from getting into that apparently form-editing state?
Capture the ProcessCmdKey event. It will give you access to those keys.
Chris .
- Follow-Ups:
- Re: Arrow Keys, PageUp, PageDn etc. Not Firing KeyDown Event
- From: Phil Galey
- Re: Arrow Keys, PageUp, PageDn etc. Not Firing KeyDown Event
- References:
- Arrow Keys, PageUp, PageDn etc. Not Firing KeyDown Event
- From: Phil Galey
- Arrow Keys, PageUp, PageDn etc. Not Firing KeyDown Event
- Prev by Date: Arrow Keys, PageUp, PageDn etc. Not Firing KeyDown Event
- Next by Date: Open many *.txt files in folder and import the data into Excel
- Previous by thread: Arrow Keys, PageUp, PageDn etc. Not Firing KeyDown Event
- Next by thread: Re: Arrow Keys, PageUp, PageDn etc. Not Firing KeyDown Event
- Index(es):