Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make FormKeyDown for fsMDIForm? 1

Status
Not open for further replies.

Delphard

Programmer
Jul 22, 2004
144
RS
Seems like fsMDIForm won't accept FormKeyDown (also FormKeyPress) events?!?!?!
 
That's because it isn't supposed to. MDI parent forms automatically dispatch all key presses to the appropriate child (which is typically a tMainMenu or a tMDIChild).

If you want to intercept this you can proceed one of two ways:

1. Write a message handler function

2. Override the form's WndProc

Both ways are pretty much the same thing, but #1 is cleaner... You'll want to trap WM_KEYDOWN and/or WM_KEYUP.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top