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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access