Creating Your First Menu

There are two ways to create a menu in .NET. Using Visual Studio .NET is by far the easiest. However, it can obscure some of the internal workings, and so later in this chapter you will see a simple menu that uses Notepad.

To get started, fire up Visual Studio .NET and start a new project. Drag a MainMenu item from the Toolbox onto your Form, as shown in Figure 18-1.

Figure 18-2. New menu item


There are a few things to notice in Figure 18-1. First, in the upper-lefthand corner is the new menu item, ready for you to add text. This placement makes adding the menu items incredibly easy. Second, in the lower-lefthand corner, a non-UI element, mainMenu1, has been added. Its properties are visible in the properties window.

Programming. NET Windows Applications
Programming .Net Windows Applications
ISBN: 0596003218
EAN: 2147483647
Year: 2003
Pages: 148
Simiral book on Amazon © 2008-2017.
If you may any questions please contact us: