Key Events in an MDI Frame form
Posted on 2000-02-14
We have an MDI Application. We'd like to trap key presses in the application when there are no children forms displayed/created. In other words, when only the MDI Frame form is displayed, we'd like to track the key press events to start a function.
I've added handlers to the Key* events (KeyPress, KeyDown and KeyUp) on the Frame form (FormStyle fsMDIForm). However, it never gets the events. I'm presuming that, by creating the form as a MDI frame, windows sends the key events to the active child form.
Is there a way to, when there is no active child form, to get these events sent to the frame window? I've tried to watch the HandleMessage procedure, but I wasn't having much luck.