Datasheet

Figure 1-41: The Customize dialog box’s Commands tab
lets you add commands to toolbars and menus.
To create a new menu, select the New Menu item in the list on the left. Then drag and drop the New Menu
entry from the right list onto the IDE’s menu area.
To make a command that executes a macro you have created, select the Macros category in the list on the
left. Find the macro you want to use in the list on the right, and drag it onto a toolbar or menu.
To remove a command from a toolbar or menu, right-click it and select Delete. Alternatively, you can
click and drag the command somewhere that it cannot be placed. For example, you can drop it on the
Customize dialog box or most places in the IDE other than on a menu or toolbar (code editors, the
Properties window, the Toolbox). The mouse cursor changes to a box with an X beside it when the
mouse is over one of these areas.
Modifying the IDE’s standard menus and toolbars can cause confusion later. You may later discover
that you need a command that you have removed from a menu, and it may take you quite a while to find
it again. A better approach to modifying standard commands is to create a new custom toolbar or menu.
Add the commands you want to use to the new toolbar and then hide the standard toolbar that you are
replacing. Later you can restore the hidden standard toolbar if necessary.
If you right-click a command in a menu or toolbar while the Customize dialog box is open, Visual Studio
displays the pop-up menu shown in Figure 1-42. Click the Name text box and enter a new name to change
the text displayed in the menu or toolbar.
Use the Copy Button Image command to copy the button’s image to the clipboard. Use Paste Button Image
to paste a copied image onto a button. Usually you will use these two commands to copy the image from an
existing button to one you are adding. However, the Paste Button Image command will paste any graphical
42
Part I: Getting Started
37055c016.qxd 4/8/07 12:46 PM Page 42