Export (0) Print
Expand All
137 out of 225 rated this helpful - Rate this topic

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.

NoteNote

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 Compiler and Language

Language improvements in Visual Basic 2005 simplify source code and enable interaction with components that use advanced features. For more information, see What's New in the Visual Basic Language and What's New in the Visual Basic Compiler.

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.

Developing Applications

The My.Application Object provides access to an application, allowing you to easily update it and log information from it. My.Application can also be used to access an application's command-line arguments or run code when the application starts or ends. For more information, see Updating an Application, Logging Information from the Application, and Accessing a Running Application in Visual Basic.

Clipboard

The My.Computer.Clipboard Object provides easy access for reading from and writing to the Clipboard, along with methods for clearing it and determining what type of data is stored on it. For more information, see Storing Data to and Reading From the Clipboard.

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.

Network Operations

The My.Computer.Network Object provides methods and properties for uploading and downloading files, for checking connection status, and for determining whether remote computers are available. For more information, see Performing Network Operations.

Resources

The My.Resources Object allows you to access resources such as audio resources, icon resources, and localized resources. For more information, see Accessing Application Resources.

You can add and manage resources using the Resources page of the Project Designer. For more information, see Resources Page, Project Designer.

User Settings and Application Settings

The My.Settings Object allows you to persist and change user settings as well as read application settings. For more information, see Accessing Application Settings.

You can also manage application settings using the Settings page of the Project Designer. For more information, see Settings Page, Project Designer.

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.

For more information, see Edit and Continue (Visual Basic).

Attribute Editing in Properties Window

You can now edit common attributes that apply to your classes and methods in the Properties window instead of having to apply them in code.

See How to: Edit Code Attributes for more information.

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.

See Filtered Completion Lists in Visual Basic for more information.

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.

See Visual Basic-Specific IntelliSense for more information. Also see How to: Set a Security Zone for a ClickOnce Application.

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.

For more information, see: Visual Basic IntelliSense Code Snippets and How to: Insert Snippets Into Your Code (Visual Basic).

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.

For more information, see Smart Compile Auto Correction and Configuring Warnings in Visual Basic.

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.

For more information, see How to: Correct Run-Time Errors with the Exception Assistant.

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.

For more information, see How to: Create XML Documentation in Visual Basic.

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.

For more information, see Introduction to the Project Designer.

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.

The new Security, Signing, and Publish tabs on the Project Designer allow you to customize your ClickOnce deployment. Use the new Publish command on the Build menu (or the shortcut menu in Solution Explorer) to get to the Publish Wizard, a tool to step you through publishing your application. For more information, see Publish Page, Project Designer, Signing Page, Project Designer, and Security Page, Project Designer.

64-bit Application Deployment

Both ClickOnce and Windows Installer deployment support installation on 64-bit platforms. For more information, see Deploying 64-bit Applications.

Expanded Samples

Visual Basic 2005 ships over 60 sample applications. The new features covered include:

  • ClickOnce deployment

  • Programming with the My object

  • Language enhancements, including generics and XML comments

  • Data access

For more information, see Visual Basic Sample Applications.

Upgrading from Visual Basic 6.0

The upgrade tools in Visual Basic 2005 feature numerous enhancements, including the ability to upgrade many Visual Basic 6.0 ActiveX controls to their Visual Basic 2005 equivalents.

For more information, see What's New in Upgrading.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.