O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.6. Menus

In Windows applications, menus are used to provide a list of commands available for users to execute in the application. Typical examples are the File menu, which may contain such commands as New, Open, Close, Save, and SaveAs, the Edit menu, with commands such as Copy, Cut, and Paste, the Print menu, which may provide such commands as PrintPreview, PageSetup, and Print, and so on.

To create menus in Windows forms applications, we use classes derived from the Menu class that provide the base functionality for all menus. The Menu class serves as a base class for three further classes – the ContextMenu class, used to create shortcut menus, the MainMenu class, used as a container for the menu structure of a form, and the MenuItem class, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required