We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Platform : WinForms
Category : Menus

How do menu shortcuts work?

The focused control’s ProcessCmdKey will be called first.

1) The Control class implementation of this method will check if there is a ContextMenu associated with the Control and if so let the context menu handle the shortcut.

2) If not handled, the ProcessCmdKey of the parent will be called recursively until the Form is reached.

3) When the Form is reached it’s MainMenu will be requested to handle the key.

You can override ProcessCmdKey of any Control and interrupt the normal processing. Note that you can also override the ProcessCmdKey method is the MainMenu and ContextMenu classes (this is not documented) to override default processing.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon