Generating Code for a Windows Application

Before generating code for Windows Application, you need to install CAB (available from the Microsoft Web site).

Check for the following required files in your installation directory:
  • Microsoft.Practices.CompositeUI.dll

  • Microsoft.Practices.CompositeUI.WinForms.dll

  • Microsoft.Practices.ObjectBuilder.dll

  1. Select Tools > Check Model to verify if there are errors or warnings in the model. If there are errors, fix them before continuing with code generation.
  2. Select Tools > General Options, and click the Variables node.
  3. Add a variable CAB_PATH with the value of your installation directory
  4. Select Language > Generate C# 2.0 Code or Generate Visual Basic 2005 Code to open the Generation dialog box.
  5. Specify a target directory, and then click OK to begin generation.

    The following files will be generated:

    • Domain files (persistent classes, mapping files)

    • DAL files (database connection file and data access files)

    • A solution file and project files

    • A login dialog

    • Forms for persistent classes

    • Controller files

For each persistent class, PowerDesigner generates:

  • A find dialog for searching objects

  • A list view form for displaying find results

  • A detail view form for displaying object's detailed information

  • A create view form for creating new objects

You can deploy or edit a Windows application in an IDE, such as Visual Studio .NET 2005.