Send Keyboard Events from one Form to another Form

Posted by thalm on Stack Overflow See other posts from Stack Overflow or by thalm
Published on 2010-06-01T14:27:50Z Indexed on 2010/06/01 14:33 UTC
Read the original article Hit count: 303

Filed under:
|
|
|
|

Hello,

my question is quite simple:

Our C# application has one MainForm with a menu and several keyboard shortcuts associated with the menu entries.

Now we need to trigger the menu entries from some child forms too. But since the MainForm is inactive when one of the child forms is active, the shortcuts do not work.

Is there a simple way to propagate all keyboard events from the child form to the 'Owner' form? Or just to another form in general?

Ah, and we cannot use some low level windows stuff, because we need to run the application on Mono/Linux too.

© Stack Overflow or respective owner

Related posts about c#

Related posts about events