Building a Visual Basic Toolbar

Revision as of 20:16, 26 July 2007 by Neil (Talk | contribs) (New page: No Windows application would truly be complete without at least one toolbar. Toolbars provide a quick way for users to perform tasks without having to navigate the application's menu syste...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Revision as of 20:16, 26 July 2007 by Neil (Talk | contribs) (New page: No Windows application would truly be complete without at least one toolbar. Toolbars provide a quick way for users to perform tasks without having to navigate the application's menu syste...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

No Windows application would truly be complete without at least one toolbar. Toolbars provide a quick way for users to perform tasks without having to navigate the application's menu system. In this chapter of Visual Basic Essentials we will cover in detail the topic of creating toolbars in Visual Basic using Visual Studio.

Creating a Toolbar

Toolbars are referred to in Visual Basic as ToolStrips. The first step in creating a toolbar is to add a ToolStrip control to the form. Begin by starting Visual Studio and creating a new Windows Application project named vbToolbar (for details on creating new project see Creating a New Visual Basic Project). When the new project has been created and the default form appears display the Toolbox and double click on the ToolStrip control to add it to the form:

File:Exampl.jpg

Various types of control can be added to a toolbar. To add a control, simply click on the down arrow of the button on the toolbar. A menu will appear listing the various types of control which may be added. Select a button control. Once the new button control has been added, right click on the button to display a menu containing various options for modifying the control (including setting a new image on the button).

Using the above technique add two more buttons to the toolbar. Press F5 to build and run the application. The application should appear as follows:

File:Exampl.jpg