1 / 8

MenuStrip Object

MenuStrip Object. MenuStrip Object. A menu bar is a strip across the top of a window that contains one or more menu names A menu is a group of commands, or items, presented in a list. Adding a MenuStrip. Open one of your old programs.

bona
Download Presentation

MenuStrip Object

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MenuStrip Object

  2. MenuStrip Object • A menu bar is a strip across the top of a window that contains one or more menu names • A menu is a group of commands, or items, presented in a list.

  3. Adding a MenuStrip • Open one of your old programs. • Open the Menus and Toolbars subcategory and drag the MenuStrip object onto the form. • Change the name of the MenuStrip to mnu and then the name of your project.

  4. Customizing a MenuStrip • Click the Type Here box on the menu bar. Type &File to identify the File menu, and then press the ENTER key • Click File in the MenuStrip object to select it, scroll in the Properties window to the (Name) property, and then change the name to mnuFileMenu • To add a menu item to the File menu, click the Type Here box below the File menu name. Type &Clear and then press ENTER to create a new menu item named Clear with C as the hot key

  5. Customizing a MenuStrip • On the File menu, click Clear to select it, scroll in the Properties window until the (Name) property is visible, and then change the name to mnuClearItem

  6. Event Handlers for Menu Items • In Design view, double-click the Exit menu item to open the code editing window • Code the menu item to exit the program. • In Design view, double-click the Clear menu item to open the code editing window • Code the clear item to clear all text boxes, etc.

  7. Standard Items for a Menu • Visual Basic 2005 contains an Action Tag that allows you to create a full standard menu bar commonly provided in Windows programs • Action tags provide a way for you to specify a set of actions, called smart actions, for an object as you design a form • With a new Windows Form object open, drag the MenuStrip .NET component onto the Windows Form object. Click the Action Tag on the MenuStrip object • Click Insert Standard Items on the MenuStrip Tasks menu • Click File on the menu bar to view the individual menu items and their associated icons on the File menu

  8. Standard Items for a Menu

More Related