Dela via


What's New in Visual Basic

This page lists the new and enhanced features available in Visual Basic 2008 and associated service releases. Select from the links in the following sections to read more details about a feature.

Note

If you are upgrading from Visual Basic 6.0 to Visual Basic 2008, there are many topics that can help you transition to the new version. For more information, see What's New for Visual Basic 6.0 Users.

Topic Contents

New in the SP1 Version of Visual Basic 2008

  • Power Packs Controls and Components

    • DataRepeater Control

    • Line and Shape Controls

    • PrintForm Component

    • Printer Compatibility Library

    • Distributing Power Packs

  • XML to Schema Wizard

  • ClickOnce Deployment

  • Data Access

New in Visual Basic 2008 Original Release Version

  • Visual Basic Compiler and Language

  • Data Access

  • Integrated Development Environment

    • Enhanced XML Editing

    • Support for New Project Types

    • Support for New .NET Framework Versions

  • Deployment

    • ClickOnce Deployment

    • Windows Installer Deployment

  • Expanded Samples

  • Upgrading from Visual Basic 6.0

New in the SP1 Version of Visual Basic 2008

The following sections describe the new and enhanced features of the SP1 version of Visual Basic 2008.

Power Packs Controls and Components

The Microsoft Visual Basic Power Packs 3.0 controls and components that were previously available for download are now included in Visual Studio 2008 Service Pack 1. Power Packs can be used in both Visual Basic and Visual C# Windows Forms Application projects.

Included in the Power Packs are a new DataRepeater control in addition to updated versions of the previously released LineShape and Shape controls, the PrintForm component, and the Printer Compatibility Library.

DataRepeater Control

The new DataRepeater control enables you use standard Windows Forms controls to display rows of data in a scrollable container. This control provides more flexibility than standard grid controls.

For more information, see Introduction to the DataRepeater Control (Visual Studio).

Line and Shape Controls

The LineShape and Shape controls are a set of three graphical controls that enable you to draw lines, ovals, and rectangles on forms and containers at design time. These controls make it easier to enhance the look of your user interface. LineShape and Shape controls encapsulate many of the graphics methods that are contained in the System.Drawing namespace. This enables you to draw lines and shapes in a single step without having to create graphics objects, pens, and brushes. You can create complex graphics effects such as gradient fills by just setting some properties. These controls also provide events such as click and double-click to enable you to respond to and interact with end users.

For more information, see Introduction to the Line and Shape Controls (Visual Studio).

PrintForm Component

The PrintForm component is designed to easily print a Windows Form as you could in Visual Basic 6.0. By using the PrintForm component, you can once again lay out a Windows Form exactly how you want it and enable users to print the form as a quick report.For more information, see PrintForm Component (Visual Basic).

Printer Compatibility Library

The Printer Compatibility Library enables projects that use the Visual Basic 6.0 Printer object and Printers collection to be upgraded without requiring you to rewrite the printing logic. Just add a reference to the library, declare a Printer, and make some minor syntax changes, and the project will be able to print by using the Printers collection and Printer object as it did in Visual Basic 6.0. This version incorporates a new Write method into the Printer object. The new method enables you to print text without using a forced carriage return, like the semicolon syntax used by the Print method in Visual Basic 6.0.

For more information, see Printer Compatibility Library.

Distributing Power Packs

Also included is a bootstrapping package that enables you to easily redistribute the Visual Basic Power Packs with an application. This enables you to include the Power Packs in a ClickOnce Project or Setup Project by just clicking a check box.

For more information, see Deploying Applications That Reference Power Packs Controls.

XML to Schema Wizard

The XML to Schema Wizard, which was previously available as a PowerToy download, is now included in Visual Studio 2008 SP1. You can use the XML to Schema Wizard to create an XML schema set that is inferred from one or more XML documents and include it your project. For more information, see XML to Schema Wizard.

ClickOnce Deployment

Starting in Visual Studio 2008 SP1, ClickOnce deployment includes the following feature enhancements:

  • Support for publishing unsigned manifests. For more information, see "Generating an Unsigned Manifest" in How to: Sign Application and Deployment Manifests.

  • Enhancements to the Publish Options dialog box. These enhancements include support for configuring the following options:

    • File Associations.

    • Error URL, which specifies a Web site that is displayed in dialog boxes that are encountered during ClickOnce installations.

    • Suite, which specifies the name of the folder on the Start menu in which the application will be installed.

    • Exclude Deployment Provider URL, which specifies whether to exclude the deployment provider URL from the deployment manifest.

    For more information, see Publish Options Dialog Box.

Data Access

In Visual Studio 2008 SP1, the following enhancements have been made to local database caching:

New in Visual Basic 2008 Original Release Version

The following sections describe the new and enhanced features of the original release version of Visual Basic 2008.

Visual Basic Compiler and Language

Language improvements in Visual Basic 2008 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 2008 Breaking Changes describes changes in the language that might prevent an application that was created in Visual Studio 2005 from compiling, or change its run-time behavior.

Data Access

This release includes the following new features for incorporating data into applications:

  • Language-Integrated Query (LINQ) technology presents important programming-language advances. LINQ to SQL applies LINQ technology to relational databases. For more information, see LINQ to SQL.

  • The Object Relational Designer (O/R Designer) assists developers in creating and editing the objects (LINQ to SQL entities) that map between an application and a remote database.

  • N-tier support for typed datasets provides enhancements to the Dataset Designer that make it easier to separate the TableAdapters and typed dataset code into discrete projects. For more information, see N-Tier Data Application Overview and How to: Separate Datasets and TableAdapters into Different Projects.

  • Hierarchical update capabilities have been incorporated into the Dataset Designer. These enhancements provide generated code that includes the save logic necessary for maintaining referential integrity between related tables in a database. For more information, see Hierarchical Update.

  • Local database caching incorporates a SQL Server Compact 3.5 database into an application and configures it to periodically synchronize the data with a remote database on a server. Local database caching enables applications to reduce the number of roundtrips between the application and a database server when data changes infrequently or when applications can connect to the server database only occasionally. For more information, see Occasionally Connected Applications Overview.

  • Microsoft SQL Server Compact 3.5 is a compact database that can be deployed on desktop computers, smart devices, and Tablet PCs. SQL Server Compact 3.5 provides developers with a common programming model for developing both native and managed applications.

For more information about data in Visual Studio 2008, see What's New in Data.

Integrated Development Environment

The following sections describe enhancements to the Visual Studio integrated development environment (IDE).

Enhanced XML Editing

XML capabilities in Visual Basic have been greatly improved with the addition of LINQ to XML. Visual Basic further enhances the XML editing experience with the addition of XML Axis Properties and XML Literals, which allow you to include XML as first-class data types in your Visual Basic code, making it fast and easy to create, transform, modify, and query XML. For more information, see XML in Visual Basic.

Support for New Project Types

In Visual Studio 2008, the Project Designer supports the new Windows Presentation Foundation (WPF) and Web application project types.

There are four WPF project types:

  • WinFX Windows Application

  • WinFX Web Browser Application

  • WinFX Custom Control Library

  • WinFX Service Library

When a WPF project is loaded into the integrated development environment (IDE), the user interface of the Project Designer pages lets you specify properties specific to WPF applications. For more information about WPF, see Windows Presentation Foundation.

Web application projects were added to Visual Studio in Visual Studio 2005 Service Pack 1 and are also included in Visual Studio 2008. The new Web application project model is the same as the Visual Studio .NET 2003 Web project model, but it is updated with features of Visual Studio 2005 and ASP.NET version 2.0. The Visual Studio Project Designer supports Web application projects, with the limitation that these projects can only be application-scoped. 

You can access the Project Designer by clicking Properties on the Project menu. For more information, see Introduction to the Project Designer.

Support for New .NET Framework Versions

Multitargeting lets you target code to a specific version of the .NET Framework:

  • .NET Framework 2.0, included with Visual Studio 2005.

  • .NET Framework 3.0, included with Windows Vista.

  • .NET Framework 3.5, included with Visual Studio 2008.

To support multitargeting, click the appropriate version in the new Target framework list in the Advanced Compiler Settings Dialog Box (Visual Basic) and the Advanced Build Settings Dialog Box (C#).

Deployment

The following sections describe enhancements in deployment.

ClickOnce Deployment

ClickOnce deployment has been enhanced with the following new features:

  • ClickOnce supports the deployment of WPF Web Browser Applications. WPF Web Browser Applications are hosted in a Web browser and therefore require special deployment and security settings. When you build and deploy these applications, Visual Studio provides the appropriate user interface and default values. For more information, see Publish Page, Project Designer.

  • ClickOnce gives ISVs the option to re-sign the application manifest with their customer's company name, application name, and deployment and support URL. When end users install the application, the ISV's original company branding still appears on the Do you want to trust this application? dialog box. For more information, see the description of the Use application manifest for trust information check box in Publish Options Dialog Box.

  • You can build and deploy Visual Studio Tools for Office applications by using the Project Designer's Publish page or the Publish Wizard. For more information, see Publish Page, Project Designer or Publish Wizard.

  • ClickOnce supports manifest generation under User Access Control (UAC) in Windows Vista. For more information, see ClickOnce Deployment on ClickOnce Deployment on Windows Vista.

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

Windows Installer Deployment

Windows Installer deployment has been updated to support Windows Vista and the latest .NET Framework versions:

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

Expanded Samples

Visual Basic 2008 includes many sample applications. The new features covered include the following:

LINQ Technologies:

Windows Communication Foundation:

For more information, see Visual Basic Sample Applications.

Upgrading from Visual Basic 6.0

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

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

See Also

Concepts

What's New in Visual Studio 2008

Additions to Windows Forms for the .NET Framework 2.0

What's New in ASP.NET and Web Development

What's New in Deployment

What's New in the Visual Basic Language

What's New in the .NET Framework Version 3.5

What's New in Smart Device Projects

What's New in Visual Studio Tools for Office

Reference

What's New in the Visual Studio Debugger

Change History

Date

History

Reason

July 2008

Added information about a new breaking changes topic.

Information enhancement.

July 2008

Added section that describes Visual Basic 2008 SP1 changes.

SP1 feature change.