Exporting to Visual Studio .NET

form.suite4.net projects can be exported as a Visual Studio .NET project in the language of your choice (currently C# and Visual Basic .NET are supported). Additionally, you have the option of converting the Windows Forms project into an ASP.NET Web Forms project if this should be required.

The export is performed in the Form Manager. Choose File > Export as VS Project. The "Export as Visual Studio Project" dialog appears.

In addition to selecting the directory where you want the project files to be stored (using the button marked with 1 above) you have to make two choices in regards to the consistency of the both the form.suite4.net project and the Visual Studio project:

After you click on the "Start" button in the "Export as Visual Studio Project" dialog, the form.suite4.net project will be exported to the directory you specified earlier. Progress is displayed in the dialog while the files are being written.

The export engine creates a separate directory for each Group you have specified in the Project Explorer and organizes the generated code in namespaces corresponding to the Groups' names. After the export is finished you can view the generated files in Visual Studio .NET and add behavior to the form and controls you have created.

Note: combined with the import function, exporting a form.suite4.net project as a Visual Studio project is a powerful method of converting a layout project between .NET languages: import a C# project form Visual Studio .NET into form.suite4.net, set the project language to VB.NET and export it using the procedure described above -- all the imported files will be converted to VB.NET.
Please be aware that the import only considers the layout elements of a VS.NET project. Behavior will not be imported and will thus not be available in the exported project either.

Exporting as ASP.NET Web Forms

If you select the "ASP.NET Web Forms" option in the "Export as Visual Studio Project" dialog, the existing Windows Forms project will be converted to ASP.NET. Here is what happens during the conversion process:

  1. Forms are converted to ASP.NET pages (*.aspx).
  2. Controls are mapped to matching controls in the System.Web.UI.* namespaces. Currently form.suite4.net only supports the conversion of basic controls, such as TextBox, RadioButton, GroupBox, TabControl and the like. Complex controls such as the TreeView will not be converted.
  3. Controls are positioned on the ASP.NET page using either flow-layout (HTML tables) or grid-layout (Cascading Stylesheets), depending on the choices you made for the form and the project (see ASP.NET-related settings in the Project Explorer for more information).
  4. A code-behind file (*.aspx.cs | *.aspx.vb) is created that contains the control declarations and — if Grid Layout is used — full initialization routines for the controls.

Once the files have been written to the designated output directory, you can either import them into an existing ASP.NET project or create a new one using Internet Information Services (IIS) manager or Visual Studio .NET. Compile them, preview the output in the browser and make any necessary changes and extensions as you see fit.