Menus

Menus are one of the primary ways that users interact with many applications. Each window can display its own menu, although it is more common to find a menu only on the main window. Each window can also display a context menu, if the programmer so chooses. A context menu is one that is displayed when the user right-clicks with the mouse to display a popup menu.

MainMenu Control

The MainMenu control can be used to design, display, and manage a menu that is attached to the top of the client area of the window. We demonstrate the use of menus by building a new version of the HotelAdmin program we saw in the previous chapter. In this example, named HotelAdmin2, we have the following main menu structure:

							File        Hotels        Help
   Exit       Add           About... ...

Get Application Development Using Visual Basic® and .NET 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.