Microsoft KB Archive/318205

= How to use the key productivity features in Visual Studio 2005 and in Visual Studio .NET =

Article ID: 318205

Article Last Modified on 5/11/2007

-

APPLIES TO


 * Microsoft Visual Studio 2005 Standard Edition
 * Microsoft Visual Studio 2005 Professional Edition
 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Academic Edition

-



This article was previously published under Q318205





SUMMARY
This article discusses five key productivity features in Microsoft Visual Studio 2005 and in Microsoft Visual Studio .NET:
 * Server Explorer
 * Dynamic Help
 * Enhanced Task List
 * Enhanced Toolbox
 * Enhanced IntelliSense

Other important productivity features, including Automation, Visual Database Tools, and the greatly improved debugger, are discussed in other Microsoft Knowledge Base &quot;How To&quot; articles.

Requirements
The following list outlines the recommended hardware, software, network infrastructure, and service packs that you need:
 * Visual Studio 2005 or Visual Studio .NET

This article assumes that you are familiar with the following topics:
 * Visual Studio 2005 or Visual Studio .NET
 * Microsoft Visual Basic 2005 or Microsoft Visual Basic .NET

Using the key productivity features in Visual Studio 2005 and in Visual Studio .NET
Note All the subheadings in this section assume that you have started Visual Studio 2005 or Visual Studio .NET.
 * To start Visual Studio 2005, click Start, point to Programs, point to Microsoft Visual Studio 2005, and then click Microsoft Visual Studio 2005.
 * To start Visual Studio .NET, click Start, point to Programs, point to Microsoft Visual Studio .NET, and then click Microsoft Visual Studio .NET.

Server Explorer
Server Explorer is a server management console that you can use to view and to manipulate data links, database connections, and system resources on any server to which you have network access.

Server Explorer includes two primary nodes:
 * Data Connections. This node contains connections that the user added to specific databases.
 * Servers. The  node in this node contains various server resource and database nodes, including the following:
 * Crystal Services
 * Event Logs
 * Message Queues
 * Performance Counters
 * Services
 * SQL Servers

To use Server Explorer, follow these steps:  Press CTRL+ALT+S to open Server Explorer. Right-click the Data Connections node, and then click Add Connection. In the Data Link Properties dialog box, follow these steps:  In the Select or enter a server name box, type or select the name of your localhost server. Under Enter information to log on to the server, either click Use Windows NT Integrated security, or type a user name and password. In the Select a database on the server list, select a database on your server. Click OK. Notice that the new connection appears under the Data Connections node. If you do not see your new connection, make sure that you expand the Data Connections node.</li></ol> </li> Click the node for your new connection.

Notice that you can access all of the objects that appear in SQL Server Enterprise Manager. You can expand any of these nodes and double-click the database objects that are contained in the nodes to view and to edit the object, similar to SQL Server Enterprise Manager.

Note You do not have to specify a data connection in localhost connections because one already exists under the SQL Servers node (which appears under the Servers node). When you click the SQL Servers and the  nodes, notice that the Northwind connection already exists. Therefore, you typically use the Data Connections node for direct connections to a database that you would not have access to in your server network.</li> To close Server Explorer, click the Close button in the upper-right corner of the console.

Alternately, you can click the Auto Hide button to hide Server Explorer and to keep Server Explorer running. You can move your pointer over the Server Explorer tab at the edge of the integrated development environment (IDE) to view the Server Explorer console temporarily. You can also click the Auto Hide button again so that the Server Explorer console window is visible permanently.</li></ol>

Dynamic Help
The &quot;Dynamic Help Window&quot; documentation from the Visual Studio 2005 and Visual Studio .NET product documentation describes the functionality of Dynamic Help as follows:

This window provides pointers to information specific to the current area you are using or task you are trying to complete in the integrated development environment (IDE)... The Dynamic Help window displays information that fits into the following categories, among others: Help, Actions, Miscellaneous, Training, Getting Started, and Samples. Links in these categories are displayed according to weighted relevance.

To view this documentation, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfRelatedLinksWindow.asp

To use Dynamic Help, follow these steps:
 * 1) Click Dynamic Help on the Help menu to open the Dynamic Help window.
 * 2) On the Tools menu, click Options.
 * 3) In the Options dialog box, make sure that the Environment node is expanded.
 * 4) Click Dynamic Help under the Environment node to customize how the Dynamic Help window appears, and then click OK. If you use Visual Studio 2005, you can find the Dynamic Help window in the Help subnode under Environment.
 * 5) Press CTRL+ALT+S to open Server Explorer if it is not already open.
 * 6) In Server Explorer, click the Data Connections node, and simultaneously watch the Dynamic Help window. Notice that the links change, particularly in the Help category.
 * 7) In Server Explorer, click the Servers node, and simultaneously watch the Dynamic Help window. Notice that a new set of relevant links appears in the Dynamic Help window.

The Dynamic Help window makes pertinent support information immediately available. You can even add custom links to your own Help content so that these links appear in the Dynamic Help window. For more information about how to add custom links to the Dynamic Help window, see the &quot;References&quot; section.

Note The context-sensitive help that is available from the F1 key is still an important tool to use for support information. F1 is often the best way to find the answer that you need. For example, if you select an error message in the Task List, you can generally obtain specific information to help you resolve the problem by pressing F1.

Task List
The Task List maintains the features of the Task List from earlier versions of Microsoft Visual Studio, such as the ability to view build errors and the ability to view coding errors that the precompiler detects. You can double-click an IntelliSense message and move the insertion point to the specified location in the code.

Additionally, Visual Studio 2005 and Visual Studio .NET add new functionality to the Task List. You can now mark your code with specialized comments that are parsed and displayed in a tabular format in the Task List.

To use the Task List, follow these steps: <ol> On the View menu, point to Show Tasks, and then click All. Notice you can also select more specific Task View categories also.</li> Follow these steps to create a new project: <ul> Visual Studio 2005 <ol style="list-style-type: lower-alpha;"> On the File menu, point to New, and then click Web Site.</li> In the New Web Site dialog box, click ASP.NET Web Site under Visual Studio installed templates.</li> In the Language list, verify that Visual Basic is selected, and then click OK.</li></ol> </li> Visual Studio .NET <ol style="list-style-type: lower-alpha;"> On the File menu, point to New, and then click Project.</li> In the New Project dialog box, click Visual Basic Project under Project Types, and then click ASP.NET Web Application under Templates. Click OK.</li></ol> </li></ul> </li> When WebForm1.aspx appears, double-click anywhere on the Web Form to move to the Page_Load event handler.

Note In Visual Studio 2005, the file name is Default.aspx instead of WebForm1.aspx.</li>  Add the following code to the handler. ' TODO: A task </li> Press ENTER. Notice that your task appears in the Task List window.</li> Double-click the task to move to the commented line of code.</li></ol>

Other built-in keywords include &quot;HACK&quot; and &quot;UNDONE&quot;. You can also add custom keywords. To add custom keywords, follow these steps: <ol> <li>On the Tools menu, click Options.</li> <li>In the Options dialog box, click the Environment node, and then click Task List. Notice that the list of built-in keywords appears in the Token list box.</li> <li>In the Name text box under Comment Tokens, type COOL, and then click Add. Notice that COOL is added to the list of keywords in the Token list box.</li> <li>Click OK.</li> <li> Add the following code to the Page_Load event handler. ' COOL: Tell my friends. Notice that your task appears in the Task List window. </li></ol>

Toolbox
The Toolbox in Visual Studio 2005 and in Visual Studio .NET is very similar to the Toolbox in earlier versions of Visual Studio. However, the Toolbox in Visual Studio .NET includes Web-based and Windows-based form controls, ActiveX controls, XML Web services, Hypertext Markup Language (HTML) elements, objects, and items from the Clipboard. Moreover, you can now create custom items that you can easily reuse by dragging code or objects from the Code window to the Toolbox.

To use the Toolbox, follow these steps:
 * 1) Use the ASP.NET Web application project that you created in the &quot;Task List&quot; section.
 * 2) Press CTRL+ALT+X to open the Toolbox. Notice that the Toolbox contains various tool groups.
 * 3) Press F7 to switch to Code view, and then click the WebForm1.aspx tab. Notice the Toolbox adjusts to the context and displays tool groups that relate to Web Forms design.

You can also add a custom tool group to the Toolbox. To add a custom tool group, follow these steps:
 * 1) Right-click in the Toolbox, and then click Add Tab.
 * 2) Type MyGroup, and then press ENTER.
 * 3) Expand the Web Forms group.
 * 4) Drag a DataGrid control from the Toolbox onto the Web Form designer. The instance of the DataGrid control is automatically named DataGrid1. If you use Visual Studio 2005, you can drag a DataView control instead.
 * 5) Customize the properties of the DataGrid control that you created in step 4.
 * 6) Drag the DataGrid1 control from the Web Form designer to the MyGroup tab in the Toolbox. Notice that a new item named Markup Fragment is added to your custom tab.
 * 7) Right-click Markup Fragment. The shortcut menu includes various options, including Rename. You can now reuse this code fragment as you would any of the other items in the Toolbox.

Note You can use source code instead of visual objects to perform the same procedure.

IntelliSense
Visual Studio 2005 and Visual Studio .NET enhance the IntelliSense feature from previous versions of Visual Studio.

To use IntelliSense, follow these steps: <ol> <li>Use the ASP.NET Web application project that you created in the &quot;Task List&quot; section.</li> <li>In the Code window, click the WebForm1.aspx.vb tab.</li> <li>In the Page_Load event handler, type Me. after the commented code.

Notice that the IntelliSense drop-down list of options appears, which contains all of the properties, methods, and events that are related to the class in which you are positioned.</li> <li>Use the DOWN ARROW key to browse through the options in the IntelliSense drop-down list. You can pause on each option to review the associated ToolTip.</li> <li>Press the ESC key to hide the drop-down list, and then press CTRL+J. Notice that the drop-down list appears immediately with the same list of options.</li> <li>Select IsPostBack from the list, and then press the TAB key. Notice that the complete word appears.</li> <li>Press ENTER to move to a new line, and then type isp. Notice that nothing occurs.

Although you do not need the Me keyword, IntelliSense does not assume that you are trying to type IsPostBack until you invoke the Complete Word feature by pressing CTRL+J.</li> <li> Add the following code. If IsPostBack Then End If Move your pointer over the IsPostBack property until the ToolTip appears. This feature is called Quick Info. To immediately access this feature, position your cursor over the keyword in question, press CTRL+K, and then press CTRL+I. </li> <li>Type Me.FindControl( in the If...Then statement.

Notice that, as you type the opening parenthesis, IntelliSense displays the complete declaration for the function in a pop-up window.

Additionally, notice that the first parameter in the list appears bold. For overloaded functions, the Parameters list allows you to select the function that you want to use. Press the UP ARROW or the DOWN ARROW to move between functions.

Note When you type function parameters, the bold formatting changes to reflect the next parameter that you must type.</li></ol>

<div class="references_section">