Chapter 3. Cool Controls
In this chapter you’ll explore the tools available for building advanced forms with Visual Basic 2005.
Start by changing the title displayed on the Welcome Form you created in Chapter 2. Click on the form, and set the Text property (in the Properties Windows) to Welcome.
Okay, that was pretty easy. Have a cookie and let’s move on.
Adding a Menu and Toolbar
To navigate to the new pages that you’ll be adding to the application in this chapter, you’ll need to add a menu to the Welcome page. Lengthen the form and drag all the controls down (including the images) to make room for the menu. To do so, click in the form, click Control-A to mark all the images, then grab a move-handle and drag them in unison.
Drag a menu strip control from the Toolbox to the top of the Welcome page. Notice that “MenuStrip1” is added. Rename this to
mnuWelcome. Click on the Menu, and add four top-level menus
: Employees, Customers, Orders, and Suppliers. For each, create two sub-menu choices: Show All and Find.
To move from one top-level menu item to the next, use tab. Within a menu, to move from one sub-item to the next, use Enter.
You can now move all the other controls back up into position below the menu.
Rename All the Menu Choices
Before proceeding, rename the various menu choices by clicking on each and setting its Name property in the Properties window. For example, click on Employees → Show All and set its name to
mnuEmployeesShowAll, and set its Find sub-menu to