What's New in Visual Basic

This page lists the new and enhanced features available with this release of Visual Basic in Visual Studio 2005. Select from the links below to read more details about a feature.

Note

If you are moving from Visual Basic 6.0 to Visual Basic 2005, there are a number of topics that help you make the move to the new version. For more information, see What's New for Visual Basic 6.0 Users.

Visual Basic Development with My

Visual Basic 2005 provides new features for rapid application development that aim to improve productivity and ease of use while delivering power. One of these features, called My, provides access to commonly used functionality provided by the .NET Framework, as well as information and default object instances that are related to the application and its run-time environment. This information is organized in a format that is discoverable through IntelliSense and logically delineated according to use. For more information, see Development with My.

Computer Resources

Many computer resources can be accessed through My objects, including the computer's clock, keyboard, mouse, ports, and registry. For more information, see Accessing Computer Resources.

File Input/Output

The My.Computer.FileSystem Object provides file-access methods and properties that simplify file I/O. The TextFieldParser Object allows you to parse large delimited or fixed-width text files; methods such as WriteAllText, WriteAllBytes, ReadAllText, and ReadAllBytes make reading and writing to files intuitive while increasing performance. Similarly, the GetFileInfo, GetDirectoryInfo, and GetDriveInfo methods provide information about files, directories, and drives. For more information, see Parsing Text Files with the TextFieldParser Object.

Data Access

Visual Basic 2005 includes several new features to assist in developing applications that access data. The Data Source Configuration Wizard simplifies connecting your application to data in databases, Web services, and user-created objects.

The new Data Sources Window provides a central location to view the data available to and associated with your project, and it reduces the complexity of data binding by allowing you to drag items from the window onto forms to create data-bound controls.

Filling datasets, running queries, and executing stored procedures can now be accomplished using the new Visual Studio-generated TableAdapter object. The new local data feature allows you to include Microsoft Access database files and Microsoft SQL Server Express database files directly into your application. For a complete list of new features, see What's New in Data.

Design-Time Enhancements

Edit and Continue

Edit and Continue allows you to make changes to your application while it is running under the debugger without stopping and restarting the application. The changes you make during break mode are applied immediately when you continue execution of your application.

Attribute Editing in Properties Window

IntelliSense Filtering

You can now adjust the level of detail supplied by IntelliSense in the Code Editor. When the IntelliSense window is displayed, you can filter out the less commonly used members by clicking the Common tab, or see everything that is available by clicking the All tab. By adjusting the level, you can easily filter out uncommon or esoteric members when they are not needed, or include them when they are.

IntelliSense in Zone

IntelliSense in Zone is a Visual Basic IntelliSense feature that displays certain items in the statement completion list in a different color if they do not have enough permission to run in the security zone specified. This design-time support allows you to more easily develop applications that run in partial trust.

IntelliSense Code Snippets

The IntelliSense code snippet library consists of 380 prewritten pieces of code. You can add these reusable routines to your code and edit them using the pointers the code contains. The code snippets are available to you when you right-click in the Code Editor and click Insert Snippet. They are also available through keyboard shortcuts.

Code-snippet tasks range from creating a custom exception, to sending an e-mail message, to drawing a circle. Some are simple expansions for common programming structures. The library is extensible; you can create code tasks that suit your business needs and add them to the library. You can also download more library tasks from third-party software vendors and Visual Basic community sites.

Error Correction and Warnings

With Smart Compile Error Correction, the Code Editor can suggest solutions to common errors and warnings and allow you to select the appropriate correction, which is then applied to your code. When an error occurs, if there is a symbol under the right side of the squiggle, resting your mouse over the squiggle turns the symbol into a smart tag panel. Clicking the smart tag panel opens the Error Correction Options helper window, which provides a description of the error, suggests possible ways to fix it, and, where appropriate, allows you to preview the fix.

Exception Assistant

When you are debugging an application, by default the Exception Assistant opens to assist with unhandled exceptions. If you choose, you can change the environment so that the Assistant appears when any exception occurs within your code. The Exception Assistant lists the type of the exception, the message specific to the exception that has been thrown, a list of trouble-shooting tips, and possible actions to apply.

XML Documentation

XML code documentation allows you to document your classes in code and expose that documentation as XML. The resulting XML documentation can be consumed and displayed in a variety of ways, allowing you to create documentation for your code while you are writing it.

Document Outline Window

The Document Outline window now supports outline views for Windows Forms in addition to ASP.NET Web pages and HTML pages. You can use the Document Outline window to navigate among the controls on Windows Forms while in Design view of the editor. To access this window, on the View menu, click Other Windows and then click Document Outline. For more information, see Document Outline Window

Project Designer for Managing Projects, Settings, and Resources

The Project Designer provides a centralized location for managing project properties, settings, and resources. It can be accessed with the Properties command on the Project menu.

Settings Designer

The Settings page of the Project Designer allows you to specify a project's application settings, which can be user-scoped or application-scoped. This feature replaces Dynamic Properties. For information, see Settings Page, Project Designer.

Resource Designer

The Resource Designer is a user interface tool that allows you to manage resources (such as strings, images, icons, audio, and files) that a project uses. It creates strongly-typed resources that you can access at run time using the My.Resources Object. For information about accessing resources through the My.Resources object, see Accessing Application Resources.

The Resources page of the Project Designer hosts an instance of the Resource Designer that stores and maintains resources in a single location (Resources.resx). For more information, see Resources Page, Project Designer.

ClickOnce Deployment

ClickOnce deployment allows you to publish self-updating Windows-based and console applications that can be installed, updated, and run as easily as Web applications. For more information, see ClickOnce Deployment.