Application Techniques

Appeon PowerBuilder® 2025

FOR WINDOWS

DOCUMENT ID: DC37774-01-1900-01

LAST REVISED: December 03, 2024

Copyright © Appeon. All rights reserved.

This publication pertains to Appeon software and to any subsequent release until otherwise indicated in new editions or technical notes. Information in this document is subject to change without notice. The software described herein is furnished under a license agreement, and it may be used or copied only in accordance with the terms of that agreement.

Upgrades are provided only at regularly scheduled software release dates. No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of Appeon.

Appeon and other Appeon products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Appeon.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP and SAP affiliate company.

Unicode and the Unicode Logo are registered trademarks of Unicode, Inc.

All other company and product names mentioned may be trademarks of the respective companies with which they are associated.

Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013 for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies.

Table of Contents

Sample Applications
Using Sample Applications
About the sample applications
Installing the sample applications
Opening the sample applications
Using the Code Examples application
Language Techniques
Selected Object-Oriented Programming Topics
Terminology review
PowerBuilder techniques
Other techniques
Selected PowerScript Topics
Dot notation
Constant declarations
Controlling access for instance variables
Resolving naming conflicts
Return values from ancestor scripts
Types of arguments for functions and events
Ancestor and descendant variables
Optimizing expressions for DataWindow and external objects
Exception handling in PowerBuilder
Garbage collection and memory management
Efficient compiling and performance
Reading and writing text or binary files
Getting Information About PowerBuilder Class Definitions
Overview of class definition information
Examining a class definition
User Interface Techniques
Building an MDI Application
About MDI
Building an MDI frame window
Using sheets
Displaying sheets in tabbed view
Providing MicroHelp
Using toolbars in MDI applications
Sizing the client area
About keyboard support in MDI applications
Managing Window Instances
About window instances
Declaring instances of windows
Using window arrays
Referencing entities in descendants
Using Tab Controls in a Window
About Tab controls
Defining and managing tab pages
Customizing the Tab control
Using Tab controls in scripts
Using TreeView Controls
About TreeView controls
Populating TreeViews
Managing TreeView items
Managing TreeView pictures
Using DataWindow information to populate a TreeView
Using Lists in a Window
About presenting lists
Using lists
Using drop-down lists
Using ListView controls
Using Drag and Drop in a Window
About drag and drop
Drag-and-drop properties, events, and functions
Identifying the dragged control
Providing Online Help for an Application
Creating help files
Providing online help for developers
Providing online help for users
Data Access Techniques
Using Transaction Objects
About Transaction objects
Working with Transaction objects
Using Transaction objects to call stored procedures
Supported DBMS features when calling stored procedures
Using MobiLink Synchronization
About MobiLink synchronization
How the synchronization works
Working with PowerBuilder synchronization objects
Preparing consolidated databases
Creating remote databases
Synchronization techniques
Using PowerBuilder XML Services
About XML and PowerBuilder
About PBDOM
PBDOM object hierarchy
PBDOM node objects
Adding pbdom.pbx to your application
Using PBDOM
Handling PBDOM exceptions
XML namespaces
Manipulating Graphs
Using graphs
Populating a graph with data
Modifying graph properties
Accessing data properties
Using point and click
Implementing Rich Text
Using rich text in an application
Using a RichText DataWindow object
Using a RichTextEdit control
Rich text and the end user
Piping Data Between Data Sources
About data pipelines
Building the objects you need
Performing some initial housekeeping
Starting the pipeline
Handling row errors
Performing some final housekeeping
Using RESTFul Web Services with JSON
Supported JSON formats
Importing JSON data
Compressing and extracting data
Supporting OAuth 2.0 Authorization Server
OAuth Grant Types
Transferring files with HTTPClient
Requirements
Coding in PowerBuilder
Usage examples
Program Access Techniques
Calling .NET Assembly in an Application
About .NET assembly
C# language vs. PowerScript language
Adding an adapter for unsupported features
Importing the adapter
Triggering PowerScript events from C# code
Deploying .NET assembly
Debugging .NET assembly
Using DDE in an Application (Obsolete)
About DDE
DDE functions and events
Using OLE in an Application
OLE support in PowerBuilder
OLE controls in a window
OLE controls and insertable objects
OLE custom controls
Programmable OLE Objects
OLE objects in scripts
OLE information in the Browser
Advanced ways to manipulate OLE objects
Building a Mail-Enabled Application
Differences between SMTP and MAPI
About SMTP
Using SMTP
About MAPI
Using MAPI
Using External Functions and Other Processing Extensions
Using external functions
Using utility functions to manage information
Sending Windows messages
The Message object
Context information
Building a COM or COM+ Client
About building a COM or COM+ client
Connecting to a COM server
Interacting with the COM component
Controlling transactions from a client
Developing Web Applications
Web Application Development
PowerServer
.NET DataStore
Automated Deployment
PowerClient
General Techniques
Internationalizing an Application
Developing international applications
Using Unicode
Internationalizing the user interface
Localizing the product
Building Accessible Applications
Understanding accessibility challenges
Accessibility requirements for software and Web applications
Creating accessible software applications with PowerBuilder
About VPATs
Testing product accessibility
Printing from an Application
Printing functions
Printing basics
Printing a job
Using tabs
Stopping a print job
Advanced printing techniques
Building PDF documents in the application
Overview
PDF Builder objects
PDF Builder script references
Examples
Managing Initialization Files and the Windows Registry
About preferences and default settings
Managing information in initialization files
Managing information in the Windows registry
Building InfoMaker Styles and Actions
About form styles
Naming the DataWindow controls in a form style
Building and using a form style
Modifying an existing style
Building a style from scratch
Completing the style
Using the style
Deployment Techniques
Packaging an Application for Deployment
About deploying applications
Creating an executable version of your application
Delivering your application to end users
Deploying Applications and Components
Deploying applications, components, and supporting files
PowerBuilder Runtime Packager
Third-party components and deployment
PowerBuilder runtime files
Database connections
PowerBuilder extensions
PDF export
Deploying 64-Bit Windows Applications
Deploying 64-Bit Windows Applications