Menus

To provide functionality within your application that spans a broader scope than a single control within the form, Visual Studio .NET includes the capability to specify several types of menu and display status bars and toolbars.

Creating Menus and Menu Items

Menus are used to group commonly available and less used functions into a user-friendly format. The MainMenu, ContextMenu, and MenuItem classes are all derived from the Menu class. There can be only a single MainMenu for a Windows form. A ContextMenu can be associated with each control, if desired, to provide commands or information related to the control. Table 2.25 details the important members of the MenuItem class.

Table 2.25. Important Members of the MenuItem Class
MemberTypeDescription ...

Get Developing and Implementing Windows®-Based Applications with Visual C#™ .NET and Visual Studio® .NET Exam Cram™ 2 (Exam 70-316) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.