This entry starts by looking at the new features in Windows Forms 2.0, and then proceeds to describe the migration strategy for existing Windows Forms 1.0 applications that are to be migrated to .NET Framework 2.0.
New Windows Forms Controls
We've added some new controls to Whidbey:
Other WinForms Improvements
Deployment Improvements
ClickOnce, a no-touch deployment and update mechanism for rich client applications. You can create a ClickOnce application through the Publish Wizard, which publishes an application to a URL. You can choose whether the application is available in online/offline modes or only whilst online. This has nothing to do with the functionality of the application, but it allows you to choose whether the shortcut to the application is in the start menu or as a URL. Publish Wizard allows you to sign the deployment manifest with a key, so that only the application publisher can make modifications to the application. The wizard copies all the files and the deployment manifest to a location (typically a URL). By default applications are set up to require full trust, but you can modify them to use a lower trust model. If necessary, the application prompts users for permissions to install the application if it requires a higher level of trust than would otherwise be granted to it.
Designer Features
Migration
The good news is that you can take any WinForms 1.x application and use it unchanged in the Whidbey environment using the existing controls. When you open a WinForms 1.x solution in Visual Studio 2005, the Visual Studio Conversion Wizard will kick in and offer to convert the project and solution files across to the new format, but it will leave the code completely intact. The old controls still exist, but are deprecated: for practical purposes, that means that they are not visible from the toolbox, but are available.
The bad news is that if you want to migrate a WinForms 1.x application to utilise 2.0 functionality today, you'll have to do a little work by hand. There are some controls that are fairly easy to upgrade (e.g. StatusBar -> StatusStrip), but others that are much harder (e.g. DataGrid -> GridView). One approach to see the changes between the controls is to compare the output from the designer tools. For example, toolbar separators are treated as a special kind of button in the ToolBar control, but exist in their own right as separate controls in the ToolStrip. These minor changes should be fairly easy to fix with search and replace or a sed-style script, however.
A Comparison of Old and New Controls
One thing to bear in mind is that the DataGridView does not include support for hierarchical tables, something the old DataGrid was good at doing.