System.Windows.Forms.MenuStrip Class

Provides a menu system for a form.

See Also: MenuStrip Members


public class MenuStrip : ToolStrip


System.Windows.Forms.MenuStrip is the top-level container that supersedes System.Windows.Forms.MainMenu. It also provides key handling and multiple document interface (MDI) features. Functionally, System.Windows.Forms.ToolStripDropDownItem and System.Windows.Forms.ToolStripMenuItem work along with System.Windows.Forms.MenuStrip, although they are derived from System.Windows.Forms.ToolStripItem.

The following items are specifically designed to work seamlessly with both System.Windows.Forms.ToolStripSystemRenderer and System.Windows.Forms.ToolStripProfessionalRenderer in all orientations. They are available by default at design time for the System.Windows.Forms.MenuStrip control:

The System.Windows.Forms.MenuStrip control represents the container for the menu structure of a form. You can add System.Windows.Forms.ToolStripMenuItem objects to the System.Windows.Forms.MenuStrip that represent the individual menu commands in the menu structure. Each System.Windows.Forms.ToolStripMenuItem can be a command for your application or a parent menu for other submenu items.

Although System.Windows.Forms.MenuStrip replaces and adds functionality to the System.Windows.Forms.MainMenu control of previous versions, System.Windows.Forms.MainMenu is retained for both backward compatibility and future use if you choose.


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