Creating a .NET Windows Forms target
System requirements
You must install version 2.0, 3.0,
or 3.5 of the Microsoft .NET Framework on the same computer as PowerBuilder.
For intelligent update applications, you must also install the .NET
Framework 2.0, 3.0, or 3.5 SDK (x86). Make sure that the system
PATH environment variable includes:
- The location
of the .NET Framework. The location of the 2.0 version is typically C:WindowsMicrosoft.NETFrameworkv2.0.50727.
The location of the 3.5 version is typically C:WindowsMicrosoft.NETFrameworkv3.5. - For intelligent update applications, the location
of the .NET Framework SDK Bin directory. For
.NET Framework 2.0, this is typically C:Program FilesMicrosoft
Visual Studio 8SDKv2.0Bin or C:Program FilesMicrosoft.NETSDKv2.0Bin.
For version 3.5, this is typically C:Program
FilesMicrosoft Visual Studio 9SDKv3.5Bin or C:Program FilesMicrosoft
SDKsWindowsv6.0Ain.
The SDK for .NET Framework 2.0 is available from the Microsoft .NET Framework Developer Center
. The Windows
SDK for Windows Server 2008 and .NET Framework 3.5 is available
on the Microsoft .NET Framework Developer Center
.
If you installed the 1.x version of the .NET Framework or
SDK, you must make sure the PATH variable lists a supported version
of the .NET Framework or SDK first.
To publish your application as a smart client from a Web server,
you must have access to a Web server. For information about configuring
IIS on your local computer, see “Selecting the default ASP.NET
version”.
About the .NET Windows Forms target wizard
You use the PowerBuilder .NET Windows Forms Application Wizard
on the Target page in the New dialog box to create a Windows Forms
application and target, and optionally a project. The project lets
you deploy the PowerBuilder application to the file system or, if
you select the smart client option, to publish it to a server. For
more about publishing options, see Chapter 10, “Intelligent Deployment
and Update.”
If you have an existing PowerBuilder application or target
that you want to deploy as a .NET Windows Forms application, you
can select either in the wizard. If you choose to start from scratch,
the wizard creates a new library and application object.
To build a .NET Windows Forms application and
target from scratch:
-
Select Start from scratch on the Create
the Application page in the wizard. -
Specify the name of the .NET Windows Forms application
and the name and location of the PowerBuilder library (PBL) and
target (PBT). By default, the application name is used for the library
and target. -
Specify project information as described in “Creating a .NET Windows
Forms project”.
To build a .NET Windows Forms application from
an existing application and library:
-
Select Use an existing library and application
object on the Create the Application page in the wizard. -
On the Choose Library and Application page, expand
the tree view and select an existing application. -
On the Set Library Search Path page, click the
ellipsis (…) button to navigate to and select additional libraries. -
On the Specify Target File page, specify the name
of the new target file. -
Specify project information as described in “Creating a .NET Windows
Forms project”.
To build a .NET Windows Forms application from
an existing target:
-
Select Use the library list and application
object of an existing target on the Create the Application page
in the wizard. -
On the Choose a Target page, select a target from
the current workspace. -
On the Specify Target File page, specify the name
of the new target file. -
Specify project information as described in “Creating a .NET Windows
Forms project”.
Adding .NET assemblies to the target
If you want to call methods in .NET assemblies in your Windows
Forms application, you can import the assemblies into the target. For more information, see “Adding .NET assemblies to
the target”.