Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Creating a .NET Windows Forms project – PB Docs 115 – PowerBuilder Library

Creating a .NET Windows Forms project – PB Docs 115

Creating a .NET Windows Forms project

You can create a project to deploy the application in the
target wizard or by using the .NET Windows Forms wizard on the Project
page of the New dialog box.

proc.gif To build a .NET Windows Forms project object:

  1. On the Specify Project Information page,
    specify the name of the project and the library in which the project
    object will be saved.

  2. On the Specify Application General Information
    page, optionally specify a product name for the application.

    This can be different from the name of the application and
    is used as the name of the product on the General page in the Project
    painter.

    You can also specify the name of the .NET Windows Forms executable
    file (by default, this is the name of the application object with
    the extension .exe) and the major and minor
    versions and build and revision numbers for the current build (the
    default is 1.0.0.0).

  3. On the Specify Win32 Dynamic Library Files page,
    click the Add button to specify the names of any dynamic libraries
    required by your application.

    The list is prepopulated with the names of libraries referenced
    in the application’s code.

  4. On the Specify Support for Smart Client page,
    select the check box if you want to publish the application as a
    smart client. Otherwise, click Next and then Finish.

    If you select this check box, the wizard displays additional
    pages on which you set publish and update options. For more information
    about completing these wizard pages, see Chapter 10, “Intelligent Deployment
    and Update.”

Setting properties for a .NET Windows Forms project

After you click Finish in the wizard, PowerBuilder creates
a .NET Windows Forms project in the target library that you selected
and opens the project in the Project painter. The painter displays
all the values you entered in the wizard and allows you to modify
them. It also displays additional properties that you can set only
in the painter.

Table 9-1: Properties in the Project painter
Tab page Properties
General The output path is where the application
is deployed in the file system. This is not the same as the location
where the application is published if you choose to publish the
application as a smart client application.

The build type determines whether the project is deployed
as a debug build (default selection) or a release build. You use
debug builds for debugging purposes. If you select Release, no PDB
files are generated. Release builds have better performance, but
when you run a release build in the debugger, the debugger does
not stop at breakpoints.

The rebuild scope determines whether the project build is incremental
(default) or full. For information on the rebuild scope, see “Incremental rebuild for
.NET application targets”
.

Clear the Enable DEBUG Symbol check box if you do not want
any DEBUG preprocessor statements you have added to your code to
be included in your deployed application. This selection does not
affect and is not affected by the project’s debug build
or release build setting. For more information about using preprocessor
statements, see “About conditional compilation”.

Resource Files PowerBuilder .NET Windows Forms do not
support PBR files, and they are unable to locate images embedded
in PBD files. You can, however, search a PBR file for images required
by the application.

All resource files must be relative to the path of the .NET
Windows Forms target. If the files your application requires are
in another directory, copy them into the target’s directory
structure and click the Search PBR, Add Files, or Add Directory
button again.

Clear the check box in the Recursive column for a directory
to deploy only the files in the directory, or select it to deploy
files in its subdirectories as well.

For smart client applications, the Publish Type column indicates whether
the file is a static file that should be installed in the Application
directory, or application-managed data that should be installed
in a Data directory. For more information, see “Resource files and publish
type”
.

Library Files Use the Library Files tab page to make
sure all the PowerBuilder library files (PBLs or PBDs) that contain
DataWindow, Query, and Pipeline objects used by the application
are deployed with the application. If you select the check box next
to the name of a PBL that contains these types of objects, PowerBuilder
compiles the selected PBL into a PBD file before deploying it.

note.gif Objects you can reference in PBD files You can reference only DataWindow, Query, or Pipeline objects
in a PBD file. The PBD files that are generated when you compile
a Windows Forms project do not contain other PowerBuilder objects, such
as functions or user objects. If you include a PBD file in your target
that contains these other types of objects, you cannot reference
them from the Windows Forms application. They can be referenced
only from a target PBL that is converted to a .NET assembly.

If your application uses external functions, use the Add button
to include the DLL files in which they reside to the list of files
to be deployed. You can also add PowerBuilder runtime files, including pbshr115.dll and pbdwe115.dll (if
the project uses DataWindows), on this page, or you can add them
on the Prerequisites page.

Version Use the Version tab page to specify information
that displays in the generated executable file’s Properties
dialog box in Windows Explorer. The company name is used if you
publish the application. For more information, see “Publish the application”.
Post-build Use the Post-build tab page to specify
a set of commands to be executed after building the application,
but before the deployment process starts. A command can be the name
of a stand-alone executable file or an operating system command
such as copy or move. You can save a separate processing sequence
for debug builds and release builds. (You change the build type
of a project deployment on the General tab of the Project painter.)
Security Use the Security tab page to generate
a manifest file (either external or embedded) and to set the execution
level of the application.To meet the certification requirements
of the Windows Vista Logo program the application executable must
have an embedded manifest that defines the execution level and specifies
whether access to the user interface of another window is required.

You can also use the Security tab to configure CAS security
zones for your applications, minimizing the amount of trust required before
application code is run by an end user.

For information about manifest file requirements, see “Security requirements”. For information
about customized permission settings, see “Security settings” and Appendix A, “Custom
Permission Settings”

Run Use the Run tab page to specify any command
line arguments that the application requires, as well as the name
of the working directory in which the application starts.
Sign The Assembly group box on the Sign tab
page allows you to attach strong name key files to the assemblies
that your project generates. You must also use the Sign tab page
to attach digital certificates to manifest files that you publish
for smart client applications.

For more information about strong name key files, see “Strong-named assemblies”. For information
about digital certificates, see “Digital certificates”.

Intelligent update pages

The remaining pages in the Project painter are enabled if
you checked the smart client check box in the wizard or on the General
page. Check this box if you want to publish the application to a
server so that users can download it and install updates as you
make them available. For more information, see Chapter 10, “Intelligent Deployment
and Update.”

Resource and other required files

Click the Add Files button on the Resource Files page to select
image files that your application requires. PowerBuilder .NET Windows
Forms applications do not support PBR files, and they are unable
to locate images embedded in PBD files. All resource files must
be relative to the path of the .NET Windows Forms target. If the
files your application requires are not in the directory structure
accessible from the Choose Required Resource Files dialog box, copy them
into the directory structure, then reopen the dialog box.

If your application uses .NET assemblies, as in the previous
example, specify them on the .NET Assemblies tab page in the target’s
Properties dialog box. Before you deploy a PowerBuilder .NET smart
client application that uses data files, make sure the System.Windows.Forms.dll and System.Deployment.dll assemblies
are listed on this page.

netprop1.gif

Other files, such as database drivers and PowerBuilder DLLs,
should be included on the Prerequisites page if you are publishing
a smart client application, or on the Library Files page.

Security requirements

Use
the Security tab page to specify whether the application has a manifest
file that specifies its requested execution level and whether the
manifest file is external or embedded in the application. The
concept of execution level was introduced as part of Vista User
Account Control (UAC). This manifest file is not the same as the
manifest files generated when you publish a Windows Forms application
as a smart client (ClickOnce) application.

If you want to deploy an application to the Windows Vista
operating system that meets the certification requirements of the
Windows Vista Logo program, you must follow UAC guidelines. The
executable file must have an embedded manifest that defines the
execution level and specifies whether access to the user interface
of another window is required. The Vista Application Information
Service (AIS) checks the manifest file to determine the privileges with
which to launch the process.

Generate options

Select Embedded manifest if your application needs to be certified
for Vista. A manifest file with the execution level you select is
embedded in the application’s executable file.

You can also select External manifest to generate a standalone
manifest file in XML format that you ship with your application’s
executable file, or No manifest if you do not need to distribute
a manifest file.

note.gif .NET SDK required for embedded manifest If you select Embedded manifest for a Windows Forms target,
you must have a supported version of the .NET Framework SDK installed
on your system, because the process that embeds the manifest in
the executable file uses the mt.exe tool that
is distributed with the SDK.

Execution level

Select As Invoker if the application does not need elevated
or administrative privileges. Selecting a different execution level
will probably require that you modify your application to isolate
administrative features in a separate process to receive Vista certification.

Select Require Administrator if the application process must
be created by a member of the Administrators group. If the application
user does not start the process as an administrator, a message box
displays so that the user can enter the appropriate credentials.

Select Highest Available to have the AIS retrieve the highest
available access privileges for the user who starts the process.

UI access

If the application needs to drive input to higher privilege
windows on the desktop, such as an on-screen keyboard, select the “Allow
access to protected system UI” check box. For most applications
you should not select this check box. Microsoft provides this setting
for user interface Assistive Technology (Section 508) applications.

note.gif Authenticode signing required If you check the Allow access to protected system UI check
box, the application must be Authenticode signed and must reside
in a protected location, such as Program Files or Windowssystem32.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x