How To Customize the Development Environment for Visual Studio 2005 Express Editions

from:http://msdn.microsoft.com/zh-cn/beginner/bb308767(en-us).aspx

The Visual Studio Express product line provides users with most of the same customization options that are found in the full-featured versions of Visual Studio 2005. You can take the default development environment and change colors, remove and add toolbars, add line numbers, modify keyboard shortcuts, and even export your changes to a file that can be shared with others. Sharing even works between different Visual Express versions, which means that a C# user could share common settings with a Visual Basic .NET user.

Why would you want to take the time to customize your own development environment? There are a number of possibilities such as to make it look unique, reduce clutter, increase readability for a presentation, and organize tools to fit your work style.

Customized Visual C# Express IDE
Screenshot 1 - Customized Visual C# Express IDE

The screenshot above shows an example of a customized Visual C# Express development environment. As you can see, the text editor colors have been modified, line numbers added, and all toolbars removed. Other non-visual changes have been made as well, such as to the available debugging options. In the following sections we will explore customization in more detail.

Contents:



Customizing Options

Options can be viewed and modified in any Express product by selecting Tools | Options from the main menu. The Express product line provides a streamlined view of options by default, with some differences between each version.

Customizing Options

Although each version of Visual Studio Express has some variation in the default options, layout, and toolbars, there are still many similarities. To see all of the available options, select the Show All Settings checkbox at the bottom of the Options window.

screenshot two
Screenshot 2 - Options window for Visual Basic Express showing all options and settings

Here is a table of some select settings that can be modified using the Options window:

Table two

Customizing Toolbars and Commands

Now let’s take a look at how you can customize the toolbars, menus, and commands that are made available within the development environment. Available commands can be placed in a menu, a toolbar, or even both at the same time. To start customizing, select Tools | Customize from the main menu. Alternatively, you can select View | Toolbars | Customize from the main menu.

screenshot three
Screenshot 3 - Customize window allows you to customize Toolbars and Commands

Once the Customize window is open, tabs for customizing Toolbars and Commands are made available. In addition, the actual toolbars and main menu are now in a design mode that allows adding and deleting commands, moving commands, changing command images, and more. For example, the screenshot below shows that I can delete the Properties Window command from the View menu by simply right-clicking on it and selecting Delete from the context menu that appears.

screenshot four
Screenshot 4 - Deleting a command from a menu

The Toolbars tab of the Customize window allows you to enable or disable any of the default toolbars by selecting or de-selecting the associated checkbox. Keep in mind that toolbar changes take effect immediately. You can even create your own toolbar and put only the commands that you want on it.

The Commands tab of the Customize window lists all available commands for categories such as Build, Data, Debug, Tools, and so on. This tab is your toolbox for customizing your main menu or toolbars. To add a command to the menu or a toolbar, simply drag the command to the desire location.

Keyboard Shortcuts

Shortcuts exist to make your development life easier and more productive. Most would associate keyboard shortcuts with experienced users, but even beginners can benefit from learning the shortcuts to commonly used commands.

Every command that is available to Visual Studio can be assigned a shortcut. To view and/or change these shortcuts, select Tools | Options from the main menu and navigate to Environment | Keyboard.

screenshot five
Screenshot 5 - Options window provides access Keyboard shortcut settings

In the screenshot above, you can see that the Community.CodezoneCommunity command has been selected and that Ctrl+Alt+H has been assigned as the shortcut key combination. By default, new shortcuts will work in a global context, but it is possible to make them only work in a specific context such as in the Windows Forms Designer. If the shortcut keys that you select are already in use an additional drop-down box will become active and show you the conflicting command.

Importing and exporting settings

Each version of Express corresponds to a specific language and includes default settings for its integrated development environment (IDE). Visual Studio settings include window layout, fonts and colors, keyboard shortcuts, debugging options, text editing options, and more. Virtually anything that is customizable within the IDE is saved to the current settings file for the current Windows user. For example, the current settings for VB Express would be saved to a file named CurrentSettings.vssettings within your My Documents\Visual Studio 2005\Settings\VB Express folder.

Visual Studio makes it very easy to import and export your settings file for backup and sharing purposes by providing a wizard. Start the Import and Export Settings wizard by selecting Tools | Import and Export Settings from the main menu.

import export settings dialog box

The Settings wizard allows you to do a number of tasks, including the following:

  • Export selected settings
  • Import selected settings
  • Reset settings to their original version

Having the ability to import or export selected settings enables a number of useful scenarios. For example, let’s say that you have customized the color scheme for your text editor and wish to share it with your friends. Using the settings wizard, you can export just the settings that modify the text editor and post them on your website or blog.

screenshot six
Screenshot 6 - You can choose which settings you want to export

When other developers import your custom settings file, only the settings that you originally exported can be transferred to their Express installation. Even if you had done a wholesale export of all settings, the import process would still prompt the user to select which settings they want to import, preventing an automatic overwrite of settings that the user does not wish to change.

How to Reset Settings from the Command Line

If you get yourself into a big mess or simply want to return to a default state quickly, select Tools | Import and Export Settings from the main menu. Next, select Reset all Settings from the wizard and click the Next button. You will be prompted to save your current settings by default, but you can also choose to abandon all current changes and select the Next button once again. After the reset has completed, restart the IDE.

Alternatively, you can also perform a reset via the command line using the “/resetsettings” command line switch. For a default installation of Visual Basic Express, the full command would be: C:\Program Files\Microsoft Visual Studio 8\ Common7\IDE>VBExpress /resetsettings

原文地址:https://www.cnblogs.com/SFAN/p/2192812.html