Section 2.3. Menu Bar and Toolbar


2.3. Menu Bar and Toolbar

Commands for managing the IDE and for developing, maintaining and executing programs are contained in menus, which are located on the menu bar of the IDE (Fig. 2.7). The set of menus displayed depends on what you are currently doing in the IDE.

Figure 2.7. Visual Studio menu bar.


Menus contain groups of related commands (also called menu items) that, when selected, cause the IDE to perform specific actions (e.g., open a window, save a file, print a file and execute a program). For example, new projects are created by selecting File > New Project.... The menus depicted in Fig. 2.7 are summarized in Fig. 2.8. In Chapter 14, Graphical User Interface Concepts: Part 2, we discuss how to create and add your own menus and menu items to your programs.

Figure 2.8. Summary of Visual Studio 2005 IDE menus.

Menu

Description

File

Contains commands for opening, closing, adding and saving projects, as well as printing project data and exiting Visual Studio.

Edit

Contains commands for editing programs, such as cut, copy, paste, undo, redo, delete, find and select.

View

Contains commands for displaying windows (e.g., Solution Explorer, Toolbox, Properties window) and for adding toolbars to the IDE.

Project

Contains commands for managing projects and their files.

Build

Contains commands for compiling programs.

Debug

Contains commands for debugging (i.e., identifying and correcting problems in programs) and running programs. Debugging is discussed in detail in Appendix C.

Data

Contains commands for interacting with databases (i.e., organized collections of data stored on computers), which we discuss in Chapter 20, Databases, SQL and ADO.NET.

Format

Contains commands for arranging and modifying a form's controls. Note that the Format menu appears only when a GUI component is selected in Design view.

Tools

Contains commands for accessing additional IDE tools (e.g., the Toolbox) and options that enable customization of the IDE.

Window

Contains commands for arranging and displaying windows.

Community

Contains commands for sending questions directly to Microsoft, checking question status, sending feedback on Visual Basic and searching the Code-Zone developer center and the Microsoft developers community site.

Help

Contains commands for accessing the IDE's help features.


Rather than navigating the menus from the menu bar, you can access many of the more common commands from the toolbar (Fig. 2.9), which contains graphics, called icons, that graphically represent commands. By default, the standard toolbar is displayed when you run Visual Studio for the first time; it contains icons for the most commonly used commands, such as opening a file, adding an item to a project, save and run (Fig. 2.9). The icons that appear on the standard toolbar may vary depending on the version of Visual Studio you are using. Some commands are initially disabled (or unavailable to use). These commands are enabled by Visual Studio only when they are necessary. For example, Visual Studio enables the command for saving a file once you begin editing a file.

Figure 2.9. Standard Visual Studio toolbar.


You can customize the IDE by adding more toolbars. Select View > Toolbars (Fig. 2.10). Each toolbar you select will be displayed with the other toolbars at the top of the Visual Studio window. To execute a command via the toolbar, click its icon. Some icons contain a down arrow that, when clicked, displays a related command or commands, as shown in Fig. 2.11.

Figure 2.10. Adding the Build toolbar to the IDE.


Figure 2.11. IDE toolbar icon showing additional command.


It is difficult to remember what each of the icons on the toolbar represents. Positioning the mouse pointer over an icon highlights it and, after a brief pause, displays a description of the icon called a tool tip (Fig. 2.12). Tool tips help novice programmers become familiar with the IDE's features and serve as useful reminders for each toolbar icon's functionality.

Figure 2.12. Tool tip demonstration.




Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net