Datasheet

Many of the menus’ most useful commands are also available in other ways. Many provide shortcut
key combinations that make using them quick and easy. For example, Ctrl+N opens the New Project
dialog box just as if you had selected the File New Project menu command. If you find yourself
using the same command very frequently, look in the menu and learn its keyboard shortcut to save
time later.
Many menu commands are also available in standard toolbars. For example, the Debug toolbar contains
many of the same commands that are in the Debug menu. If you use a set of menu commands frequently,
you may want to display the corresponding toolbar to make using the commands easier.
Visual Studio also provides many commands through context menus. For example, if you right-click a
project in the Solution Explorer, the context menu includes an Add Reference command that displays
the Add Reference dialog box just as if you had invoked Project Add Reference. Often it is easier to
find a command by right-clicking an object related to whatever you want to do than it is to wander
through the menus.
The following sections describe the general layout of the standard menus. You might want to open the
menus in Visual Studio as you read these sections, so you can follow along.
Note that Visual Studio displays different menus and different commands in menus depending on what
editor is active. For example, when you have a form open in the form editor, Visual Studio displays a
Format menu that you can use to arrange controls on the form. When you have a code editor open,
the Format menu is hidden because it doesn’t apply to code.
File
The File menu, shown in Figure 1-3, contains commands that deal with creating, opening, saving, and
closing projects and project files.
Following is a description of the commands contained in the File menu and its submenus:
New Project This command closes the current project and displays the dialog box shown
in Figure 1-4. This dialog box lets you create new Windows applications, class libraries, console
applications, control libraries, and more. Select the type of project you want to start and click OK.
New Web Site — This command closes the current project and lets you start a new web site proj-
ect. It displays a dialog box where you can select the type of web site to create from among choices
such as ASP.NET Web Site, ASP.NET Web Service, and Personal Web Site.
Open Project — This command closes the current project and lets you open an existing project.
Open Web Site This command closes the current project and lets you open an existing web
site project.
Open File This command displays the dialog box shown in Figure 1-5 and lets you select a
file to open. The IDE uses integrated editors to let you edit the new file. For example, the simple
bitmap editor lets you set a bitmap’s size, change its number of colors, and draw on it. When
you close the file, Visual Studio asks if you want to save the file and lets you decide where to
put it. Note that this doesn’t automatically add the file to your current project. You can save the
file and use the Project Add Existing Item command if you want to do so.
9
Chapter 1: IDE
37055c016.qxd 4/8/07 12:46 PM Page 9