Customizing Your Environment

Being able to customize your IDE will make your life easier in the long run. Because you've just started using Visual Studio .NET, you probably don't know what customizations would be useful. In this section, I discuss the most useful customization options based on what I've learned using Visual Studio .NET over the last two years.

To get to the Options dialog, select Tools, Options from the main menu. You're presented with the Options dialog box shown in Figure 2.25.

Figure 2.25. The Options dialog box.


The Options dialog is broken down by tree nodes displayed on the left side of the dialog box. The right side of the dialog changes based on what you select from the left nodes.

The Environment, General node enables you to modify general IDE settings, such as the number of items to display on the Start Page, tabbed or MDI documents, auto-complete, and the docking behavior of the windows. Depending on your screen resolution, I'd bump up the number of display items in the Items window menu and the Most Recently Used List to somewhere between 15 and 24.

Changing Fonts and Colors

The Fonts and Colors item under Environment changes the default font of the Code Editors. I can't stand Times New Roman or Courier, so I always use Arial and I set my font to 14 point. The higher resolution makes reading easier on the eyes. If you prefer other colors or even want to change the background and foreground colors of the Code Editors, you can do so here.

Customizing Help Location

The Help node shown in Figure 2.26 is also a useful option to change based on your preferences. It's nice to have the Dynamic Help show everything inside of the IDE, but you might be short on screen space and want to display it outside the IDE. Choosing External Help opens all F1 requests outside the Visual Studio .NET IDE.

Figure 2.26. The Help Options dialog box.


Modifying the Keyboard Layout

The Keyboard node enables you to modify or add new shortcut keys for quicker access to frequently used items. Modifying the default keyboard mapping scheme is useful if you're used to multiple environments and want the best of all worlds inside .NET.

Saving Files in Projects and Solutions

By default, Visual Studio .NET automatically saves any changes in open documents when you run the application. This was a bad thing in Visual Basic 6 because you always had a way to revert back to the old code if your results weren't what you expected at design time. This was possible because Visual Basic 6 was interpreted, not compiled. In .NET, all code must be compiled before it can be run, so it must be saved. Leaving the default option to Save Changed to Open Documents on Build and Run is a good idea.

Task List and Comments

The Task List is a major feature in the Visual Studio .NET IDE that mimics the Tasks in Outlook. When you compile your application, any errors show up in the Task List. You can also add comments throughout your applications with special predefined tokens or custom tokens that you add. Figure 2.27 shows the Comment Tokens section. I added the FOR_TESTING comment token to my Task List.

Figure 2.27. Adding custom comment tokens to the Task List.


Now, any time I add a comment prefixed with FOR_TESTING, it shows up in my Task List with the other comment information. From the Task List, I can double-click on task items and get directly to the line of code where the comment was placed. Figure 2.28 shows an example of a comment added and the Task List displaying my current tasks.

Figure 2.28. The Task List with custom comment tokens added.


By default, the Task List displays only errors. To see everything, you must right-click on the Task List and select Show Tasks, All from the contextual menu.

If you go back to the Tools, Options dialog, you can peruse the remaining items that you can customize. Altogether, there are approximately 500 different customization options. You'll really only use a few because the defaults are based on what most developers use. The few items I have shown you are the most important. Depending on the tools you use the most and your language preference, there are options for just about everything in the Options dialog.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.199.138