Hi,
I want to catch function key press events on MDI window.
This is my scenario. When form is loaded inside MDI and user press function key say F1 or something I want to catch that and preform some form specific action based on the form. I prefer to catch this in the MDI window since I'm proving MDI window button to do the same thing as well.
So far my attempts to catch the key press or keyDown events are unsuccessful.
My question is,
is it possible to do something like that? or do I have to catch on form window level. If so please post some code on that too.
Loading
Master BillaPosted Sep 4, 2009, 12:33 PM
You can do like your thought
http://blogs.msdn.com/toub/commentrss.aspx?PostID=589423
thank you
Roei BarPosted Sep 4, 2009, 8:05 AM
here is a library to use in order to hook keyboard events
http://www.codeproject.com/KB/system/CSLLKeyboard.aspx?display=PrintAll
regarding the what to do
use
FormCollection value = Application.OpenForms;
and iterate through them, while knowing what is the current open form that is on focus you can now activate your logic on the event by form
hope this helps