Microsoft Visual Basic 2005 Step by Step (Step by Step (Microsoft))
Chapter 4 Quick Reference
To | Do this |
Create a menu item | Click the MenuStrip control, and draw a menu on your form. Click the Type Here tag on your form, and type the name of the menus and commands that you want to create. |
Add an access key to a menu item | Click the menu item twice to display the I-beam, and then type an ampersand (&) followed by the letter you want to use as an access key. |
Assign a shortcut key to a menu item | Set the ShortcutKeys property of the menu item by using the Properties window. A list of common shortcut keys is provided. |
Change the order of menu items | Drag the menu item you want to move to a new location. |
Add a toolbar to your program | Click the ToolStrip control, and draw a toolbar on your form. Right-click buttons to customize them. Double-click buttons and write event procedures to configure them. |
Use a standard dialog box in your program | Add one of the eight standard dialog box controls to your form, and then customize it with property settings and program code. Dialog box controls are located on the Dialogs and Printing Toolbar tabs. |
Display an Open dialog box | Add the OpenFileDialog control to your form. Display the dialog box with the ShowDialog method. The FileName property contains the name of the file selected. |
Display a Color dialog box | Add the ColorDialog control to your form. Display the dialog box with the ShowDialog method. The Color property contains the color the user selected. |