70-526 MCTS
Create and configure menus
Almost every GUI application written for Windows requires a menu system of some sort. There are two
menu controls supplied with .NET 2.0.
MenuStrip - this lets you build a menu that lives underneath the title panel.
ContextMenuStrip - this lets you build a context-sensitive menu, one that appears
whenever you right-click on something that has a context sensitive menu attached to it.

In the screen shot of notepad above, both types of menu can be seen. The normal menu that you
associate with a windows application, is located below the title panel, and the context menu appears
when you right-click in the area that you type in.
Typically a MenuStrip is used to give access to functionality common to the whole
application.
A ContextMenuStrip is used to give access to a focused area of functionality.
Both of these controls are derived either directly or indirectly from the ToolStrip
control.
Exam Sections
ToolStrip Overview - (not one of the headings though)
Create and configure a MenuStrip component on a Windows Form.
Change the displayed menu structure programmatically.
Create and configure the ContextMenuStrip component on a Windows
Form.
MSDN references
© Publicjoe, 2007
|