| Adding a menu |
|
|
|
|
Menus are used by most stand alone Windows applications. They can be used in a Windows Forms application as follows:
Just like the Button sample, we declare a MenuItem objet, label it and add an event handler. Then we assign a new MainMenu object to the Menu property of the form and we add the menu item to the collection of MenuItems maintained by the MainMenu object using the Add method of the collection class. The handler is identical to the one used in the Button sample. |
| < Prev | Next > |
|---|














