Hi,
I have a winforms app consisting of a main form + a number of child forms. The child forms can be floating windows, or they can be docked within the main form. I am using DockPanel Suite for this: http://dockpanelsuite.com/
The main form has a menu strip where certain menu items have keyboard shortcuts, eg. the Delete key is the shortcut for the "delete object" menu item.
This works well in with all child forms except for one, which has a scintilla.net text editor control inside it. The scintilla control has support built-in for keyboard shortcuts such as Ctrl-C and Delete. When this particular child form is highlighted and the user presses the Delete key to delete the characters to the right of the caret the main form fires the "delete object" menu item in the menu strip of the main form. This is obviously not what I want.
What would be the correct way to prevent the main form from firing the keyboard shortcuts in the main form menu strip if that one particular child form is active, ie. to let the text editor component react to the keyboard shortcuts without any other parts of the UI intercepting the events?
I have verified that the child control handles the key presses correctly if it is a floating window, in which case the main form is not active when the child form is active. The problem occurs only when the child form is nested inside the main form.
Thanks!