Delphi - How can I prevent the main form capturing keystrokes in a TMemo on another non-modal form?
Posted
by user89691
on Stack Overflow
See other posts from Stack Overflow
or by user89691
Published on 2010-04-21T05:41:34Z
Indexed on
2010/04/21
5:43 UTC
Read the original article
Hit count: 292
I have an app that opens a non-modal form from the main form. The non-modal form has a TMemo on it. The main form menu uses "space" as one of its accelerator characters.
When the non-modal form is open and the memo has focus, every time I try to enter a space into the memo on the non-modal form, the main form event for the "space" shortcut fires!
I have tried turning MainForm.KeyPreview := false while the other form is open but no dice.
Any ideas?
TIA
© Stack Overflow or respective owner