|
-
December 26th, 2006, 05:22 AM
#1
Trying to catch arrows keydown events
Hello.
I am able to do that by overriding "ProcessCmdKey", but I have problem to detect "shift + arrow" or "ctrl + arrow" keydown event (I need also to be able to detect that). So that would be much easier if I could catch the event in the main form keydown event (Form1_KeyDown) !
I read that setting KeyPreview to true should be the solution. So I added this line: this.KeyPreview = true;
But I am still not able to catch the arrow keydown event, when the focus is on a button.
It there a way to catch arrow keydown events into the main form keydown event (Form1_KeyDown) ?
Or is it an obligation to override "ProcessCmdKey" ?
If the lonely way is to override "ProcessCmdKey", is it possible to catch also "shift + arrow" and "ctrl + arrow" from there ?
Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|