System.Windows.Forms.MenuStrip.MenuActivate Event

Occurs when the user accesses the menu with the keyboard or mouse.

Syntax

public event EventHandler MenuActivate

Remarks

When activated by the ALT key, the System.Windows.Forms.MenuStrip or System.Windows.Forms.ToolStrip typically neither take nor remove the focus from the control that currently has the focus. If there is a control hosted within the System.Windows.Forms.MenuStrip or a drop-down of the System.Windows.Forms.MenuStrip, the control gains focus when the user presses the TAB key. In general, the Control.GotFocus, Control.LostFocus, Control.Enter, and Control.Leave events of System.Windows.Forms.MenuStrip might not be raised when they are activated by the keyboard. In such cases, use the MenuStrip.MenuActivate and MenuStrip.MenuDeactivate events instead.

For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0