Create and edit menus for Windows Forms applications.
Use the MenuStrip and ContextMenuStrip controls.
Respond to menu events for performing processing when a user clicks a menu command.
Manipulate menus programmatically and create dynamic menus.
Create context-sensitive pop-up menus.
Use common dialog boxes in your applications to prompt the user for the names of files and printers.
Send documents to a printer.
In Chapter 20, “Introducing Windows Forms,” you saw how to create a simple Windows Forms application that used a selection of controls and events. Many professional Microsoft Windows applications also provide menus containing commands and options, giving the user the ability to perform various tasks related to the application. In this chapter, you will learn how to create menus and add them to forms by using the MenuStrip control. You will see how to respond when the user clicks a command on a menu. You'll learn how to create pop-up menus whose contents vary according to the current context. Finally, you will find out about the common dialog controls supplied as part of the Windows Forms library. These dialog controls allow you to prompt the user for frequently used items, such as files and printers, in a quick, easy, and familiar manner.