September 9, 2002 - Hierarchy Levels of Menus
September 9, 2002|
Hierarchy Levels of Menus
Tips: September 2002
Yehuda Shiran, Ph.D.
Filemenu at the top menu bar, as you find in most applications. Let's further assume that we want to include a single item in this
Saveentry. In addition, we want to have a shortcut key for this entry, which is
CTRL-S, as in most Windows applications.
Windows forms support two relevant classes for menu building:
MenuItem. A menu item in Windows forms needs three variables:
File in our case)
Save in our case)
Let's call these variables
menuSave. We define them as follows:
To learn more about JScript .NET and ASP.NET, go to Column 117, JScript .NET, Part XI: Creating Windows Forms.
var menuMain : System.Windows.Forms.MainMenu; var menuFile : System.Windows.Forms.MenuItem; var menuSave : System.Windows.Forms.MenuItem;