I'm trying to add my own functionality for Alt-key shortcuts.
I have a MDIContainer form, and I programatically add new forms (each with just a RichTextBox) as child forms at runtime. I then add custom handlers to the newly generated RichTextBoxes.
I've been trying to write the custom RichTextBox KeyUp and/or KeyDown custom handlers such that when the user presses Alt + [some key], my code is executed and the MenuStrip does not gain focus. I've had no success.
For example, if the user presses Alt+A while the RichTextBox has focus, I want certain code executed. The code doesn't get executed, and instead the main MenuStrip gains focus. This is pretty much the exact opposite of what I'm looking for.
Other code in the KeyUp and KeyDown handlers are being executed, so I can be sure that my methods are actually handling the events; I just can't seem to prevent to MenuStrip from grabbing focus when Alt-key combinations are pressed...