Changes

Jump to: navigation, search

Creating Top-Level Menus in Visual Basic

828 bytes added, 19:30, 23 July 2007
Creating a Top-Level Menu
[[Image:Exampl.jpg]]
 
Use the ''Properties'' panel to change the name of the ''Menu Strip'' object to ''mainMenu''. Click in the ''Type Here'' field at the top of the form and enter ''&File''. This as the effect of creating a menu item object labeled "File". The ampersand (&) is added to instruct Visual Basic to use the 'F' at the beginning of the file as the accelerator key for this menu item. As such, pressing Alt+F when the application is running will be equivalent to clicking on the menu item with the mouse pointer. The location of the ampersand in the menu item ''Text'' property dictates the accelerator key. For example ''H&elp'' will declare 'e' as the accelerator for this particular men item. Windows indicates the accelerator for a menu item by underlining the letter (as you will see by the underlined 'F' on your File menu item).

Navigation menu