We have a scenario in which we present a set of WinForms UserControlsvia COM for the Legacy VB6 application. We have 3 different controls that have one on it MenuStrip, which has a hotkey Control+ Fassociated with a menu item that calls up the search dialog for controls when a shortcut is entered. When we try to check this code in our WinForms shell, the corresponding dialog appears (the one that is located in the active MdiChild) when all 3 controls exist, but the wrong dialog usually appears on the VB6 host (usually this is the dialog for the first control that was created )
I am sure that this is related to messages and all messages, but I can’t figure out how to ensure that the correct one is ToolStripMenuIteminvoked when a shortcut is entered.
I know that the ability to use a global / singleton ShortcutKeymanager / service that overrides ProcessCmdKeyis an opportunity, but that would be the last resort that we would like to return to. I just feel I need to start the message pump.
source
share