Use Json Object in PowerBuilder 2019 Older this json object use PowerServer 2016 OR Older reference github.com/xlat/pbjson Example n_mcf_json ln_json, ln_j1, ln_j2, ln_j3 n_mcf_jsonarray ln_array n_mcf_jsonparser ln_parser ln_json = Create n_mcf_json ln_j1 = Create n_mcf_json ln_array = Create n_mcf_jsonarray ln_json.put("test1", 'test, customer') ln_json.put("test2", 'test:~r~ncustomer') ln_json.put("test3", 'test "customer"') ln_json.put("test4", 'test {customer}') ln_json.put("test5", 'test [customer]') ln_array.add(ln_json) ln_json.reset() ln_json.put("test6", 'test,customer') ln_json.put("test7", 'test:customer') ln_json.put("test8", 'test "customer') ln_json.put("test9", 'test {customer}') ln_json.put("test10", 'test [customer]') ln_array.add(ln_json) ln_json.reset() ln_json.put("test11", 'test,customer') ln_json.put("test12", 'test:customer') ln_json.put("test13", 'test "custome') ln_json.put("test14", 'test {customer}') ln_json.put("test15", 'test [customer]') ln_array.add(ln_json) ln_json.reset() ln_json.put("test16", "test,customer") ln_json.put("test17", "test:customer") ln_json.put("test18", "test ~"customer") ln_json.put("test19", "test {customer}") ln_json.put("test20", "test [customer]") ln_array.add(ln_json) ln_json.reset() ln_json.put("test21", "test,customer~"") ln_json.put("test22", "test:customer~"") ln_json.put("test23", "test ~"customer~"") ln_json.put("test24", "test {customer}") ln_json.put("test25", "test [customer]") ln_array.add(ln_json) ln_j1.put("ccc", ln_array) messageBox("", ln_j1.toJsonString()) ln_j3 = ln_parser.parse(ln_j1.toJsonString()) IF Not IsValid(ln_j3) THEN return messageBox("", ln_j3.toJsonString())
A question was recently posted in the Q&A Forum about the Static HyperLink control, stating it would always open Internet Explorer to display the URL instead of the user’s default browser. My suggested solution was to use instead a normal StaticText control configured to appear like a Static HyperLink control and place code in the Clicked event of the StaticText control to issue a PowerScript Run function for the user’s default browser and pass to it the desired URL. I thought it would be an interesting challenge to determine the path and name of your default browser’s executable – and this example application is the result. It was written using PB 2017. There are numerous suggestions on the web on how to find the path and name of the default browser by interrogating the Windows Registry, but for various reasons I found them to be either out-of-date, incorrect in a Windows 10/11 system, or otherwise lacking. Eventually, I figured out a more reliable method for accomplishing this and created a PowerScript global function to implement the steps. The f_GetDefaultBrowser global function object is the result. The code is generously commented and uses only the PowerScript RegistryGet function to access keys and values in the Windows Registry. The trick, of course, is determining exactly what information needs to be retrieved from the Windows Registry. If needed, this global function can be exported, then imported into an earlier version of PowerBuilder as long as the RegistryGet PowerScript function is available. I’ve verified that RegistryGet is available in PB 9, and it may be available even earlier. I’ve noticed during testing that in some operating environments, the Static HyperLink control does indeed start up your default browser. I don’t know why it works in some operating environments and not in others. My ability to test under different operating environments is limited, so I cannot guarantee the function will work successfully under all conditions. It has worked correctly for me in all of the tests I’ve performed to date. If you happen to encounter a scenario where it does not work, please let me know by providing a response to this post. Enjoy!
Code for my 2020 Elevate Session Using the PFC Resize service without the PFC. I have broken out 2 objects from the PFC that can now be used without any other PFC objects. I've also supplied a base window to use as a guide for your ancestor window and a descendant window that shows some different resize options. Also included are 2 objects for the datawindow resize service also broken out of the pfc that you can use. Note - this target is PB2019 R2. Happy resizing!
I have the answer to resize datawindows.... I leave the result here, where you can see how the desc column is resized in the lower datawindows. (Example build in PowerBuilder 2019 R3 2728)
The PopupMenu application illustrates how to create a simple popup menu object and an ancestor DataWindow control that can utilize the popup menu. A Word document that describes the steps to create these objects on your own is included with the application, which was developed using PowerBuilder 2017. The logic in the RButtonDown (right-mouse-button down) event script in the ancestor DataWindow control is adapted from code contained in the PowerBuilder Foundation Class (PFC) libraries. All references to PFC-related objects and mthods have been removed or replaced with non-PFC equivalents.
Javascript and PowerBuilder integration JSON EDITOR TREEVIEW CHARTS (Apache echarts) THREE integration
The Apache ECharts app demonstrates techniques to enhance data visualization of PowerBuilder with open-source JavaScript charting engines. It is developed with Appeon PowerBuilder 2021 and compatible for deployment as traditional client/server, PowerClient, or PowerServer 2021. Key Techniques Demonstrated: Applying WebBrowser control Embedding Apache ECharts Integrating JavaScript with PowerScript Run Demo: https://demo.appeon.com/echarts/ Github Source Code: https://github.com/Appeon/PowerBuilder-Graph-Example/tree/master/SQL%20Anywhere%20demo/ECharts
The Google Charts app demonstrates techniques to enhance data visualization of PowerBuilder with Google's free charting service. It is developed with Appeon PowerBuilder 2021 and compatible for deployment as traditional client/server, PowerClient, or PowerServer 2021. Key Techniques Demonstrated: Applying WebBrowser control Embedding Google Charts Integrating JavaScript with PowerScript Run Demo: https://demo.appeon.com/googlecharts/ Github Source Code: https://github.com/Appeon/PowerBuilder-Graph-Example/tree/master/SQL%20Anywhere%20demo/GoogleCharts
I have been looking for a long time how to read and write barcodes in my PowerBuilder applications without having to resort to the Payment SDK's. I had always heard of an Open Source library called Zxing but until now I had not been able to get it to work in PowerBuilder. I have created a NetCore library that can be easily imported into PowerBuilder from version 2019 with the new .NET DLL Importer option. The difference from other examples I have seen is that I incorporate the ability to read the generated barcodes. For this example to work, you must have Net Core 3.1 installed. and have the SQL Server AdventureWorks sample database. This example is developed with PowerBuilder 2021 Build 1311.
This is an example of a PowerBuilder application that can retrieve data in a separate execution thread by using a PowerBuilder shared object. It was created to accompany a PowerBuilder article on this topic in the Tech Articles section of the Articles & Blogs area of the Appeon Community web site. The application was developed using PB 2017, but it has been successfully migrated and tested in PB 2019 and PB 2021. A primary benefit of using a shared object to perform data retrieval is it allows the application’s visual interface to remain responsive while the retrieval is being performed, avoiding Windows considering the app as "Not Responding" while the app waits for the retrieval request to complete. If you have any DataWindow data objects you would like to test in a multi-threaded environment, the example application should be able to help you accomplish this with very little coding. If you do not have any DataWindows of your own you wish to test, the application contains five sample DataWindows where the application simulates data retrieval delays of five to sixty seconds to allow you to verify that the GUI remains responsive during data retrieval. These simulated retrievals are performed without a database connection. You may import and test your own DataWindows, of course. In order to properly interface with any DataWindows you import, you’ll need to specify the Transaction object properties to be used, retrieval argument values (if any are needed), and DataStore Retrieve function calls (you need to code these only when retrieval argument values are used). Each DataWindow you import into this application can have its own unique Transaction object requirements. All of the customization needed to support data retrieval of imported DataWindows is accomplished in a single, well-documented non-visual object. When running the application, you may open multiple data retrieval windows from the main application window. In each retrieval window, you may select the DataWindow data object to be retrieved, whether or not multi-threaded data retrieval is to be used, and you may also optionally request the use of Asynchronous Data Operations, or “Async”, provided the database connection you are using supports and implements this feature (not all database provider interfaces do). With Async in use, you can cancel an in-progress data retrieval request. A “retrieval log” is displayed in each retrieval window so that you can monitor the progress of each retrieval request as it happens, when multi-threading is used. Each retrieval window can be re-positioned and resized during a multi-threaded data retrieval, and one of several included animated GIFs display in the retrieval window while multi-threaded data retrieval is in progress. A Word document that combines a tutorial on multi-threading in PowerBuilder with an explanation of the internal workings of the multi-threaded data retrieval example application is included in the download package.
This sample shows how you can use PBDOM technology to parse XML onto TreeView. Development Requirements: IDE: PowerBuilder 12.5
The sample code described in this blog article: https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/158-communication-with-a-smart-card-from-powerbuilder#comment-513,0 The sample is PFC based. The PFC libraries have not been provided, but are available from: https://github.com/OpenSourcePFCLibraries/2021 The sample is written in PowerBuilder 2021, but the code should work with any recent version of PowerBuilder.
A C++ DLL which does merging of PDF documents. The DLL is a wrapper for the PoDoFo library currently shipped with PowerBuilder There is also a PowerBuilder 2019 R3 demo app showing how to use it. The code is discussed in the following article: community.appeon.com/index.php/articles-...f-files-using-podofo 05/17/2021 Update: Discovered that there is a bug in PoDoFo loading landscape PDFs. I've updated the sample to include a SnapDevelop project that is a C# wrapper around SharpPDF that is then imported into PowerBuilder. The SnapDevelop approach works fine with both landscape and portrait files. The PoDoFO based sample only works with portrait files. [09/10/2021 Update]: It appears there isn't a bug in PoDoFo. PoDoFo is dependent on a number of other DLLs, and I had assumed that those were included in the PowerBuilder runtime as PoDoFo was included. They aren't. As soon as I included the other DLLs that PoDoFo is dependent on it started working correctly. Also, I've updated the sample to PowerBuilder 2021. [12/24/2021 Update]: Migrated to PowerBuilder 2021 Build 1311. Also included a 64 bit compiled version
Code for the Google Places API session
This code sample uses the open source QRCoder .net assembly ( https://github.com/codebude/QRCoder ). I created a wrapper assembly for that using SnapDevelop, and then a demo project in PowerBuilder 2019 R3 showing how it's used.
Have you ever wondered about the actual numeric value of PowerBuilder enumerations? Did you know that not all enumeration item values begin at zero, or that there are gaps in the numeric values for some enumerations? Now you can list the numeric equivalents to any PB enumeration. A simple, single-window application has been created that will list all of the enumeration item name/value pairs for any enumerated type you select. The application uses the PB TypeDefinition and EnumerationDefinition objects to dynamically obtain this information, listing the name/value pairs in a DataWindow. The list can be sorted by either the item value or the item name by clicking on a column's heading. The list can also be printed. PowerBuilder versions 2017 through 2021 are supported. But Wait, There's More... As a bonus, the application contains stand-alone "service" objects adapted from the PowerBuilder Foundation Class (PFC) libraries. Included are: A window resize service, a DataWindow drop-down search service, and a DataWindow sort service. Each can be easily integrated into a non-PFC application. The drop-down search service object contains two enhancements not currently available in the PFC: (1) The ability for the user to optionally enter a value that does not exist in the child DataWindow, and (2) the ability to optionally perform a case-sensitive search as an alternative to the standard case-insensitive search. Both of these features are controllable via object functions. A descendant DataWindow user object inherited from the base DataWindow control is included that demonstrates how easy it is to add this functionality to a non-PFC application. The stand-alone DataWindow sort service does not include the drawing of sort direction markers nor does it include support for the display of any Sort specification dialog windows... features available in the PFC. A second descendant DataWindow user object inherited from the base DataWIndow control shows you how to include this service into a non-PFC application. The stand-alone version of the window resize service includes all of the functionality available in the PFC version. Step-by-step instructions on how to integrate each of these service objects into a non-PFC application are available in the code comments.
With strong attribution to Daryl Foster... Problem: A client in the transportation space needed a way to add garage to garage time to hourly trips. So if you book a car service for 4.0 hours and the nearest base is 30 minutes away they wanted to add 60 minutes (30 minutes each way) to the trip in order to price it the way they want. Approach: Client and Developer agreed on a list of 30 cities in their country that had ‘bases’ or depots where cars could be counted on to go to/from the pickup location, perform the service and go back to the depot. Create city_centers table with city_centers.csv file provided.* Create place table with place.csv file provided.* Create minutes_to_depot table as described. The PowerBuilder project folder with all of the necessary objects is in geopostcodes - CXC.zip. The only change I made was to truncate the Google Maps API Key. *You may need to delete the geography column before you import it as the data is self-generating. These examples use PowerBuilder 2021 and Microsoft SQL Server 2019.
Attached is the code behind the 5/22/2019 webinar: https://www.appeon.com/developers/library/videos/using-dropbox-rest-api-powerbuilder.html Code is PB2017 R3 Requirements: Must have a dropbox user account. The nvo and datawindows should be able to be re-used. Hope everyone enjoyed the webinar. Feel free to contact me for freelance work, specializing in OAuth/REST integration. Kevin https://www.linkedin.com/in/kevin-ridley-88a40913/
The attached utility allows you to select a target and will list the menus within the application. If you double click on a menu, the utility will generate sample XML for a RibbonBar that will contain app menu items and ribbon buttons corresponding to menu items in the selected menu. In order to deal with inherited menus, the application adds the libraries from the selected target to it's own library list. Since that approach only works in an executable (not the development environment) you much compile the utility form the attached PBL and run the executable. As written, the utility can only deal with targets whose libraries are in the same directory as the target or in sub-directories under the target directory. If your application uses targets whose PBLs are not in that structure, you will need to modify the of_gettarget method to better handle the parsing the library locations. You can see it in operation in the following video: vimeo.com/407468290/81c471cd86 12/28/2020: The sample has been updated for 2019 R3.
This example implementation of the new PBAutoBuild utility of PowerBuilder 2021 demonstrates how to do an end-to-end automated build process that downloads from source control, generates PBLs, compiles and deploys the application. Key Techniques Demonstrated: Downloading from source control Generating PBLs Auto compiling a project Deploying as client/server Deploying as PowerClient Deploying as PowerServer Github Source Code: https://github.com/Appeon/PowerBuilder-AutoBuild-Sales-Example
The UI Modernization app demonstrates techniques to modernize the look and feel of PowerBuilder MDI apps with minimal code changes. It is developed with Appeon PowerBuilder 2021 and compatible for deployment as traditional client/server, PowerClient, or PowerServer 2021. Key Techniques Demonstrated: Applying UI Themes Applying RibbonBar control Run Demo: https://demo.appeon.com/ui/ Github Source Core: https://github.com/Appeon/PowerBuilder-UI-Example
This enhanced version of Bruce Armstrong's Custom Ribbon Bar Control allows to choose between two mode of triggering Ribbon Bar Item 's event setting the new u_rbb's #CentralizedEventHandling property value : FALSE = Default behaviour -> Events are triggered to parent window as designed by Bruce Armstrong (ue_ + item.tag) TRUE = New behaviour -> events are triggered to centralized new u_rbb 's event called itemClicked that work in the same fashion than the buttonclicked event of the Dw control.
Not Responding is a single-window application developed in PB 2017 which shows how to test for and prevent a window that is executing a long-running process (a process lasting five seconds or longer) from being “ghosted” by Windows for being unresponsive. Any window that does not process queued event messages from the thread’s message queue within five seconds is considered by Windows to be “unresponsive”. This is typically due to either (1) the window executing a long-running process, or (2) the window waiting for a response from an external source, such as the completion of a database query. The Windows Desktop Manager (WDM) task automatically hides an unresponsive window, replacing it with a “ghost” window that mimics the appearance of the unresponsive window, while appending “(Not Responding)” to the window’s caption/title. The user is able to interact with the ghost window in a limited manner and can close it, which terminates the unresponsive application. When long wait times are the cause of unresponsiveness, the best approach to prevention is multi-threading. While multi-threading is possible in PowerBuilder, it is an advanced topic not demonstrated here. There are coding techniques that can detect and/or prevent unresponsiveness caused by long-running processes, however. This application can execute a configurable, long-running process. The app illustrates: How to detect and recover from unresponsiveness caused by a long-running process. How to prevent unresponsiveness caused by a long-running process. A more detailed explanation of unresponsive windows and the coding techniques used in this example application will be available in a PB Tutorial titled “’Haunted’ Apps – How to Avoid Ghost Windows”.
This is a simple code example that shows one of the many techniques to dynamically connect to different databases using a Dynamically created .NET DataStore and consuming it with PowerBuilder.
WMI Class Properties Inspector is a single-window application which illustrates how to obtain the properties of any Windows Management Instrumentation class that supports enumeration (the listing of class instances). WMI is a means for interrogating the features and capabilities of the hardware of a computer that runs the Windows operating system. For example, using WMI, you can obtain the manufacturer's serial number of a hard drive, see BIOS attributes, determine what Plug-and-Play (PNP) devices are connected, view network adapter settings, see what services are running, and much, much more. You can select from hundreds of WMI classes organized into approximately thirty categories. Although WMI supports (when appropriate rights are in place) the examination of remote systems, the sample application is limited to inspection of the local computer only. The application was developed in PB 2017. It interfaces with WMI using COM+ via PB OLEObject objects. No Windows API functions are used. It has been tested on Windows 10 and Windows 7 as 32-bit and 64-bit applications. The WMI class instances are obtained by issuing a WQL (SQL for WMI) query, a subset of ANSI SQL that is supported by WMI. Although the application only issues generic queries (such as "Select * from classname", for example), you will be able on your own to add a Where clause containing multiple conditions or otherwise tailor the query by adapting the code as your needs dictate. A URL for documentation on WQL is included in the comments in the function that obtains the WMI class instances. The code has been generously commented throughout the application. Not every WMI class supports the enumeration of class instances. Those that do not are clearly identified. Although WMI returns information for the majority of classes quickly (less than one second), some take longer and a few can take a very long time (up to thirty minutes or more) to return. The class selection drop-down DataWindow provides a rough estimate of the anticipated response time (Fast, OK Slow, or Very Slow) to give you an idea of what to expect. A tooltip over the response time keyword quantifies the expected response time. If a query returns more than 250 (configurable via instance variable) class instances, you are given the option whether you wish to proceed or not. The class property name/value pairs for up to 10 class instances (also configurable) at a time are presented in a report DataWindow. Navigation buttons are provided and you may request the display of any single returned class instance.
This sample shows how you can interacts with WebAPI addresses by calling the HttpClient and JsonParser objects. Development Requirements: IDE: PowerBuiler 2017 R2 or above
When attempting to display the contents of a long string into an area having limited width, but with room for multiple lines, PowerBuilder & Windows will simulate a line break only where it finds white space in the string. Sometimes this behavior is adequate, but when the string lacks spaces the data is usually cropped. Wouldn't it be nice to also simulate a line break after a hyphen or before a left parenthesis? Well, now you can be in control of the parsing conditions that determine where a line break occurs. The attached sample PB application utilizes a non-visual object that analyzes the contents of a string while taking the width and height of a Static Text control, Text or Computed Field DataWindow Objects and their font properties (typeface, point size, weight, etc.) into account. You can specify the maximum number of display lines and which characters a line break can be inserted ahead of and/or after, if needed. In the event there is insufficient room to display all of the data, you can optionally request the last line end with an ellipsis (...). The NVO and sample application are generously commented. A log of the parsing analysis can be viewed. The sample application shows how a recently-posted problem in the Q&A section of the Appeon Community can be solved. As an added bonus, the sample application also illustrates how the DrawTextEx Windows API function can be used to replace a portion of a file's path with an ellipsis to allow it to be displayed without truncating the filename and extension.
Attached are the PowerBuilder built-in RibbonBar icons provided in PNG and BMP formats. You can download and use them in other areas in your application.
Demonstrates DataWindow Row Level Import/Export Enhanced JSONGenerator Enhanced JSONParser Enhanced JSONPackage
Demonstrates: RetrieveOne method – For REST methods return one row Submit method - sends request and returns data in one operation SetRequestHeader behavior modified GZIP compression handled automatically Get and Set OAuth token (using Twitter) Get and Set JWT token ( using AirMap, DocuSign and Salling Group ) Send[Method]Request, where method can be Get, Put, Post, Patch, Delete
PowerBuilder demo code and SnapDevelop projects for two different .Net Assemblies that does RS256 ( RSA with SHA256 ) encryption. You can use either a PKCS#8 or PKCS#1 private key. PowerBuilder generates the latter when you use AsymmetricGenerateKey. Either way, you need to provide the non-Base64 prefix ( the part that contains "BEGIN RSA PRIVATE KEY" for PKCS#8 and "BEGIN PRIVATE KEY" for PKCS#1 ) so that the assembly can determine which key type it's working with. The first assembly (RSASigning) uses Microsoft classes to handle the RSA encryption. It takes advantage of functions added in 3.1 of .Net Core, so it won't work if you have an older version of .Net Core installed. It takes the already SHA256 hashed data in Base64 format and returns the encrypted data in Base64 format. It was designed to allow PowerBuilder do as much of the work as possible, and just do the part that PowerBuilder doesn't currently do. The AsymetricEncrypt function in CrypterObjed does RSA-SHA1, not RSA- SHA256. The second assembly (RSASigning2) uses Bouncy Castle classes and is dependent on the Bouncy Class assembly included. I couldn't find a way to make Bouncy do just the RSA encryption without also doing the hashing, so it takes the data as a raw string and does both the SHA256 hashing and the RSA encryption.
This is a single-window example application that accompanies the PowerBuilder tutorial "A Simple Methodology for Complex Resizing Scenarios Using the PFC" that will soon be available in the CodeXchange area of the Appeon Community web site. This application was developed using PB 2017 R2 and an unmodified copy of the 2017 version of the PowerBuilder Foundation Class libraries (which are included in the zip file). The window control layouts in the resizing examples range in complexity from simple, one or two DataWindow controls to a tab control page in a nested tab control that contains eight DataWindow controls in a staggered-tile arrangement. No database is required to run the application. The tutorial describes an easy-to-follow methodology for analyzing window control layouts and translating resizing requirements into code. Although the tutorial and this example application are based on the PFC's Resize service, the approach to analyzing resizing requirements should be transferable to any framework with similar capabilities. As a bonus, the application includes two features you may find useful: 1) The ability to limit the minimum and/or maximum size of a window based on a percentage of its "original" (i.e., design) size, and 2) A resizing "grip" control that resides in the lower-right corner of the window. Neither feature is dependent on the PFC. The code is generously commented and the accompanying tutorial includes a section dedicated to each bonus feature.
C# (SnapDeveloper) and PowerBuilder code showing how to write a wrapper class for the MailKit library in SnapDevelop and use it from PowerBuilder to send SMTP email through Google Mail. 12/28/2020: The sample has been updated for 2019 R3.
GetFolderDialog() is an alternative to GetFolder() and is based on WinAPI IFileOpenDialog. Would be nice if PowerBuilder could provide something like this as a standard PowerScript function. Visual Studio 2017 getfolderdialog.dll sources (GetFolderDialog and GetFolderDialog_test solution) attached. See '.\GetFolderDialog\pb' for PB 12.5 example app. See doc dirs for VS project configuration and compilation instructions.
PB does not currently have a "SizeOf" function for returning the amount of memory required by a variable of a standard datatype or a structure. The ability to dynamically determine the size of a structure is very helpful when setting the "size" member required in some WIndows API (WinAPI) structures, particularly if it could take into account member boundary alignment padding and other conventions for both the 32-bit and 64-bit environments. Roland Smith provides a free code sample (named "SizeOf") on his TopWizProgramming.com website for calculating the size of a structure. The calculation logic is contained within a single non-visual object that was originally authored many years ago by Rui Cruz. Roland enhanced the original object to handle the datatypes added to PB in version 12.6. With Roland's permission, I've coded several additional enhancements to the object to address some features needed for the 64-bit environment and I'm making the enhanced version available to the Appeon Community. These enhancements include: It recognizes the process bitness and uses that value as the default to determine member and structure size. Either bitness can be optionally requested prior to requesting a SizeOf calculation on a structure. A sample application is included that uses this feature to display the size of several types of structures for 32-bit and 64-bit. It can determine boundary alignment for structure members and nested structures using either the progma_pack( 8 ) or progma_pack( 1 ) rules and includes padding bytes in the size calculations to address alignment issues when needed. It can calculate member and structure size for either Unicode or ANSI characters/strings. It can produce a report that describes the layout of a structure in memory, including nested structures. The Structure Layout sample application demonstrates how the structure SizeOf calculator works by determining the size of approximately thirty structures (mostly WinAPI structures) for both the 32-bit and 64-bit environments. Some WinAPI structures are large and some are small. Some grow in size in a 64-bit environment and others do not. The sample application also can perform several test suites related to a four-part tutorial titled "Interfacing PB Applications with the Windows API", which will soon be published in the Appeon Community "Articles & Blogs" section. The enhanced SizeOf non-visual object and the Structure Layout sample application were developed using PB 2017 R2 and can be compiled into either a 32-bit or 64-bit executable. It has been successfully migrated and tested in PB 2019 R2.
Rather than create different events for each app button menu item and ribbonbar button, create just three events and have the ribbonbar control determine which window event to call based on which app button menu item or ribbonbar button fired the event.
This sample shows how you can use Windows API functions for redirecting a console output (STDOUT) into a multiline edit or a log file. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
PowerBuilder supports getting secured data from the OAuth 2.0 authorization server. The Bearer access token is supported, and the following grant types are supported: • Authorization Code • Implicit Flow • Client Credentials • Extension (or Refresh Token) • Resource Owner Password This example shows how you can set up OAuth 2.0 authorization workflow using the Authorization Code grant type in a PowerBuilder application. You can refer to this article: community.appeon.com/index.php/articles-...h-powerbuilder-app-3 for more details on how to use this example. Development requirements: PowerBuilder 2019 R2 or above
JSON handling in PowerBuilder is fine to handle relational data, as long as it comes in the format defined by Appeon. But often, we need to work with data from an external interface, that’s where u_json comes in handy: You can parse, manipulate and/or generate all JSON files with the same object, in a true object oriented way. From GitHub (author: Georg Brodbeck): https://github.com/informaticon/inc.win.base.pb-json
Sending Email (with images) using MS Outlook and an ActiveX custom RichTextEdit See https://community.appeon.com/index.php/qna/q-a/outlook-email-using-richertext-activex/oldest#filter-sort or if no longer available the attached PDF.
Sample code for new compression/decompression capability in PowerBuilder 2019
Sample code showing new theme capability in PowerBuilder 2019 12/28/2020: The sample has been updated for 2019 R3.
As PB 2018 introduced many new Windows 10 style icons, this tool can be used to batch replace the old icons with the new ones in an PB application by exporting the source code using ORCA API, replacing the matching strings and then importing back into the PBLs. Please refer to the Readme.docx inside the zip file for more details. Development Requirements: IDE: PB 2018 and PB IDE that matches the target PBLs.
As PB 2019 introduced many new Windows 10 style icons, this tool can be used to batch replace the old icons with the new ones in an PB application by exporting the source code using ORCA API, replacing the matching strings and then importing back into the PBLs. Please refer to the Readme.docx inside the zip file for more details. Development Requirements: IDE: PB 2019 and PB IDE that matches the target PBLs.
This application helps you to search a key word from excel file. Its develop on PB 2017 R3.
Fast Find service to a DataWindow with PB custom event pbm_enchange, using an SLE English regional settings need to be set. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A PB utility to ensure that the edit style limit value is in sync with the underlying database column. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above Author: Bruce Armstrong Updated: 6/29/2015
The PB UersObject that can let the user click the head then sort the column. You can use that UO in place of the original PB DataWindow control. Development Requirements: IDE: Unknown
A service for providing tooltips on DataWindows with a wrapper for Microsoft Common Control using external API control comctl32.dll and so on. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This is a very small example which shows different datawindow events firing. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: EASDemo database Author: James Humphery
A PB utility to ensure that any new columns in database tables are being captured by the DataWindows that reference them. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
Autosize Height of Header and/or Trailer The only band that has autosize height is the detail band. This is a way to simulate autosize height of the header and/or trailer by using nested reports. Retrieve d_main using demo db. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A PB utility to clone display style between two datawindows. Support save as another SRD. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Converts Unicode (PB/IM 10.x, WS, DW.Net) DataWindow PBSelect to ANSI SQL for use with the SQLExpert or Quest Central DB Tuning products. Development Requirements: IDE: PB 12.5.2 (Can be upgraded to PB 12.6 or above)
ASA Demo from SAMS Advanced Client/Server PB9 book. Development Requirements: IDE: PB 12.5 (Can be upgraded to PB 12.6 or above) Database: SQL Anywhere 9 Author: Bruce Armstrong Updated: 6/29/2015
Build SQL statements graphically by using PB. For more details, please read 'ReadMe - QueryBuilder.txt'. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Using the RPCFUNC method to connect to Oracle instance in PowerBuilder. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: ORA(No Database) Author: Bruce Armstrong Updated: 6/29/2015
Demo of storing/retrieving image data in blob columns and applying to window/DataWindow image controls. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: ORA(No Database) Author: Bruce Armstrong Updated: 6/29/2015
A Demo connecting to an instance of SQLOLEDB for various data retrieval and operation, including datawindow, (stored procedure) DataWindow, doc document modification storage, new deletion modification of DataWindow, index opening and closing, etc. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: SQL Anywhere 9 Author: Sanjiv Das
Example of searching for a character string in various db objects in SQL Server 2000. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
ASE Demo from SAMS Advanced Client/Server PB9 book. Development Requirements: IDE: PB 12.5.2 (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
This sample code shows you how to dynamically create an Access database and export data to it by using ole technology. Development Requirements: IDE: PB 12.5 (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
This is a case of accessing the ACCESS database through Microsoft. Jet. OLEDB.4.0 to retrieve the table structure and primary keys. Development Requirements: IDE: PB 12.5 (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
This is a case of accessing the ACCESS database through Microsoft. Jet. OLEDB.4.0 to retrieve the table name and columns. Development Requirements: IDE: PB 12.5 (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
A PB Wizard example using UserObjects. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Philip Salgannik
A PB example of a wizard with object-oriented ideas. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Phil Kaufman
Create pure-PB code simple wizard-dialogs without PFC. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This application contains examples of how to keep your users informed during a long running process. Click on a button on the left to sample the three different techniques. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Treeview Print with State and Overlay Pictures base classes of user objects based on PB. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Martin Bremer
A simple taskbar example using PB MDI window features. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A custom MDI window that includes Treeview and TaskBar and uses the 'ArrangeSheets' function to arrange child-windows. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Philip Salgannik
An example of using external API functions(SetLayeredWindowAttributes) to transparently expose the window. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
An example of the ability to edit the font using the external API function (gdi32.dll etc). Pay particular attention to object u_rte_demo. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Marci Wilken
This is an upgraded version of the RTF font demo that uses the RTF control new to powerbuilder 10 and set to work with unicode. In addition to the conversion to 10.5 I also added some other demonstration functions such as italics, underline, and strike out and weight. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Displays Tag Property as Tooltip when the mouse is within control using pure-PB code. For more details, please refer to buttonstooltip.txt. Development Requirements: IDE: PB 9.03 (convertable to PB 8 / PB 7 /PB 6.5 using Export/Import. Most Datawindows are Release 6, so no source edit is necessary. The Example has been tested to convert to PB11 without any problem.) Author: Martin Bremer
Purposes: 1. Load picture from string (blob) into picture control. 2. Zoom and scroll picture. 3. Print picture using a DataWindow. New in this version: 1. Additional resize option. 2. Resize picture to A4 format. 3. Rememer last Resize Option. 4. Open picture in a standard picture window w_img_sh using parameter. (Tooltips for buttons more than one line) For more details, please refer to picturecontrol.txt. Development Requirements: IDE: PB 9.03 (convertable to PB 8 / PB 7 /PB 6.5) The Example has been tested to convert to PB11 without any problem. Most Datawindows are Release 6, so no source edit is necessary. Author: Martin Bremer Updated: 10/01/2007
PictureControl with zoom, scroll, print capabilities. For more details, please refer to picturecontrol.txt. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Martin Bremer
The PB Editor Control is used to display PowerScript code in a PowerBuilder application. Syntax highlighting is achieved by using the open source editor control Scintilla. In order to make the editor control work properly you must download the file SciLexer.dll from scintilla.sourceforge.net/SciTEDownload.html and copy it to your Windows System32 folder. Note: When adding the UserObject u_pbeditor to your window or UserObject, instead of setting the border property to false, using the SetBorderStyle function in u_pbeditor. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Brad Wery
Resizes all controls in the window if the window is resized. Development Requirements: IDE: PB 8.02 build 9506 (Can be upgraded to PB 12.6 or above) Should work with any PB version. Simply add the PBT to your workspace and run it.
This sample of the MVC list is closer to a real world scenario. It shows how to use the adapter pattern in order to use an existing NVO as a model. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Chris Gross
This case uses htrackbar control to customize the fill color of event gradient rectangle control, and fills rectangle control color into static text control by using external API function and so on through custom event pbm_paint. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Philip Salgannik
Purposes: 1. Treeview event Selectionchanged forwarded to UserEvent with time delay. 2. DataWindow event RowFocusChanged forwarded to UserEvent with time delay. 3. Using a timing object to control events forwarded to control user events. 4. This creates an asynchronous behavior with the option, that a user may scroll through a TreeView or DataWindow without executing the depending code on SelectionChanged/RowFocusChanged events everytime to show when the delay userevent is triggered. Additional Features: - Print a TreeView - Print a DataWinodow with preview - Print a TreeView in conjunction with a DataWindow in one composite - Tooltips for command and picture buttons - Tooltips for DataWindow buttons - Tooltips for pictures and Picture Areas - Tooltips more than one line - Click on Picture Areas - Resize and move controls with windows resize - Resize and move controls with cursor move - Multiselect DataWindow rows - DataWindow sort on header doubleclick For more details, please refer to dwtveventdelay.txt. Development Requirements: IDE: PB 9.03 (convertable to PB 8/PB 7/PB 6.5 using Export/Import) PB 11 should work without problems. Most DataWindows are Release 6, so no source edit is necessary. Author: Martin Bremer
A PB case with a docking window. For more details, please refer to readme.txt. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Brad Wery
Using Windows built in calendar control on PB. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Regan Sizer
Show Tooltips for buttons more than one line. For more details, please refer to buttonstooltip.txt. Development Requirements: IDE: PB 9.03 (convertable to PB 8/PB /PB 6.5 using Export/Import) Most DataWindows are Release 6, so no source edit is necessary. The Example has been tested to convert to PB11 without any problem. Author: Martin Bremer
Simple demo of giving back Enabled property to some Microsoft controls (those that PowerBuilder's wrapper does not expose). Also demonstrates usage of undocumented INDIRECT variables. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A PB Netstart sample using compression and decompression technology. For more details, please refer to 'Netstart sample.doc'. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: SQL Anywhere 12 Author: Berndt Hamboeck
The NVO "buildnumber" will generate a new build number every time the object is regenerated .For more details, please refer to 'Readme.txt'. Development Requirements: IDE: Unknown
Demonstrates how to use the Microsoft Chart Control addin for .Net 3.5 in a PowerBuilder Win32 application. Use Visual Studio 2008 to deploy the control. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
Demo shows how to apply fusioncharts using PBDOM technology. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Haibo Ni
It's the Advanced PowerBuilder Utilities. It contains the following: Cross Reference - Examines the relationships between the objects that make up a PowerBuilder application. DataWindow Extended Attribute Synchronizer (DWEAS) - Updates attributes of existing DataWindow objects from the PowerBuilder extended attribute tables. DataWindow SQL Verifier - Checks the syntax of the SQL used by existing DataWindow objects. PowerBuilder Extended Attribute Reporter (PEAR) - Generates reports on the contents of the PowerBuilder extended attribute tables. Stored Procedure Update - Creates PowerScript statements that use stored procedures to update the database through a DataWindow. Object Search utility - Scans one or more PowerBuilder libraries, looking for objects or text within objects. Instructions: Create a temporary folder and extract these four files to that folder. Development Requirements: IDE: PowerBuilder 11 (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: August of 2009
LeoTool is a set of utilities for PowerBuilder development. It includes export, import, search, color picker and sql format tools. Development Requirements: IDE: PowerBuilder 12.5 (Can be upgraded to PB 12.6 or above) Author: Mikhail Klygin Updated: 7/25/2008
A locator using PB web OLE control. Calling ca.maps.yahoo.com/py/maps.py . Development Requirements: IDE: PowerBuilder 12.5.2 (Can be upgraded to PB 12.6 or above) Author: Chris Pollach Updated: 10/1/2004
Demonstrates creating a workbook and copying data from DataWindows to worksheets. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
Demonstrates how to read the DocumentProperties for a Word document. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Copies a DataWindow into Excel, using OLE. Based on the other OLE demo app. This version is a function, and filters out carriage returns and line feeds. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Pat Madigan Updated: 4/4/2005
A common controls OCX demo using PB OLE technology. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
PowerBuilder example using MS Browser Control. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Reed Shilts
Demo of OLE from the SAMS PB 9 Advanced Client/Server Book. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
A lot of PowerBuilder Skins. Development Requirements: IDE: Unknown
A demo that can convert input information into JSON format information. For more details, please refer to ReadMe.docx. Development Requirements: IDE: PB 11.5 / PB 12/ PB 12.5/ PB 12.6 Author: Chris Pollach
This is the customized UI theme used in Elevate 2018 demo. You can put this as a sub-folder in the Appeon\Shared\PowerBuilder\theme180 folder side by side with the three default themes. The sub-folder name will be automatically recognized as a custom theme and listed for selection in the Themes tab in the Additional Properties of an application object. Development Requirements: IDE: PB 2018 (PB 2019).
Program that generates sudokus, randomly. Basic, medium and advanced level GNU General Public License
An example of doing hottracking (mouserollover) on header text objects in grid DataWindows. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Sample keyboard/number pad layouts (via DataWindows) for supporting touchscreen applications. Development Requirements: IDE: PB 12.5(Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
This is a case where grid DataWindow can be switched to XP format or traditional format. Development Requirements: IDE: PB 12.5(Can be upgraded to PB 12.6 or above)
A function used to get the attribute value as the DataWindow interprets it: Either the result of the expression or the value if there is not an expression. Development Requirements: IDE: Unknown
The popular Breakout game written in PowerBuilder. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A popular solitaire card game written in pure PB code. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Pure PB developed simple games including Bombs(MineSweeper), Reveal Bombs(include using shlwapi.dll) and Retro Snaker. Development Requirements: IDE: PB 8.0(Can be upgraded to PB 12.6 or above)
The famous game Space Invaders produced by PB feature 'OpenUserObject' and API control(WINMM.DLL) is used in PB code. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This is a pure PB development of multiplication exercises applications, including the use of external API controls (WINMM. DLL) to create sound, game instructions can refer to readme.txt. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Chris Pollach
A puzzle generator developed by PB which can generate a table of English letters randomly and find words in vertical order. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Chris Pollach
A PowerBuilder Port of Double Metaphone written in pure PB code. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Auther: By Lawrence Philips
A case that refers to an external API control (iphlpapi.dll, etc.) that gets MAC-Address based on IP address. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A pure PB code custom MessageBox that you can use to replace the built-in MessageBox. Development Requirements: IDE: PowerBuilder 9.0 Author: Syed Habeeb Ullah Quadri
This sample code shows how to do MIME encoding in PowerScript. Note: while the routine works, it is extremely slow. Not intended for production use. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
PB small case using one to more parameter data window object retrieval techniques. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Generate a Flex DataGrid in Flash from a PowerBuilder DataWindow (requires Flex SDK). Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
A case of referring to PB object "windowobject" to automatically adjust the size of windows and window controls according to resolution.
The enhancements are as follows:
1. Tab controls and nested tab controls are handled.
2. Stopping zoom on a datawindow control can accomplished by specifying
Resizeable response window(include using api control:user32.dll). This version works with or without a control menu. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated 7/16/2015
A case of using WinApi (user32.dll, etc.) technology to call Windows' own calculators, TXT, WORD and pass them values. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
The Demo shows how various error types are displayed. Click on the buttons to see the errors being trapped. Usage: 1. Include the p3Lib_ErrorHandler.pbl in your library path 2. Code Open(w_error) in the application SystemError event Development Requirements: IDE: PB 12.5 (Can be upgraded to PB 12.6 or above)
A small PB tool which generates various styles of MessageBox code. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This ZIP file contains the source code, images, install script, and help file for the PowerBuilder .NET Features Analyzer for use with PowerBuilder 11. For more details, please refer to README.txt. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This is a case in which PB clears the recently opened workpace by acquiring registry information. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Auther: Bruce Armstrong Updated: 6/29/2015
This is a case of a customizable wizard developed using tab control in pure PB. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This simple tool allows to share (export/import) PowerScript clips among developers and for any compatible version of PowerBuilder. This is an enhanced version of the previous published 'Powerbuilder Clip Sharing Tool'. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Global functions for use in InfoMaker 8 - 10.5 reports. Also allows export of source code, import of PSR and SRD files. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
PB9Book IM examples, include the following contents: Imstyle9.pbl : It contains some enhancements/fixes to the default imstyle9.pbl as shipped with InfoMaker. For executables created with IM9 it places the report toolbar besides the mdi-frame toolbar to maximize screen real-estate. Additionally it contains 'Easy Filter', an easy to use point-and-click filter screen. Imfunction9.pbl : Add the library imfunction9.pbl to the library search path in InfoMaker 9. This can be done in the Library Painter using the 'Library List' button. After this, use 'Design, Migrate' to ensure that the imfunction9.pbl is upgraded correctly. DWActiveX HTML Examples : • Psr_example shows how to display a PSR file using the DWActiveX. Im9toolbar.reg: It contains registry entries to allow scripting in InfoMaker Forms. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Use Winsock APIs(wsock32.dll) to create server or client sockets in PowerBuilder. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A case study of acquiring and listing LDAP group and group users, computer names and system names through PB OLEObject's ConnectToNewObject. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Use Windows API functions(DrawMenuBar etc.) to add menu items to System menu. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
Use Windows API functions(DrawMenuBar etc.) to create a split column menu. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: Bruce Armstrong Updated: 6/29/2015
This tool utilizes the object import and export functions of the PowerBuilder ORCA API to perform batch search and replace on any compatible versions of PowerBuilder source code, including PB 8 ~ PB 2017 (R2/R3). Please refer to the Readme.docx inside the zip file for more details. Development Requirements: IDE: PB 2017 R3 Client: PB 2017(R2/R3) runtime and the corresponding version of PB IDE that matches the target PBLs.
PB11 utility to create structure representing datawindow data source. Useful for creating .Net web services where the data needs to be passed as an array of a structure. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: By Bruce Armstrong Updated: 8/04/2015
PB Car MP3 player and synchronizer developed by external API control (winmm.dll). Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Fully functional Music CD Player using MCI Command set and low-level O/S API calls. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A simple PB MP3 Player desktop application that calls winmm.dll to play audio files on Win2000 system. Development Requirements: IDE: PB 12.5 or above
This sample shows how you can use Window properties to implement the dynamic effect and the transparency of the window when opening/closing it. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This sample shows how you can use external API control technology to annotate INI files. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This sample shows how you can call an external API control function (kernel32.dll) to list all files in a folder in a file format (*.ini), or find a simple application of a file in some places in the folder. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A simple PB-Script Marketing Support System Code Example. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: Unknown
This sample shows how you can use the .NET EAServer client (in version 6.3.1) with PowerBuilder 12.5.2. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: SQL Anywhere 12(no dadabase)
This sample shows how you can use the profiler capabilities built into PowerBuilder Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A PSR File Viewer Utility for pure PB DataWindows saved in PSR format Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This example shows how you can obtain code operation information such as check-out status of PB source code (*.pbl) and last check-in time. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Pure PB source code for using tabletPC ink control of small cases Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: Unknown (SQL Anywhere)
This sample shows how you can invoke the API control (VERSION.DLL) to get the version information of the windows application (*.exe). Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
A PB-Script Personal Account Manager Application Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Database: Unknown (SQL Anywhere)
Pure PB source code for changing the printer PB uses for pre-PB8 versions of PB. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This sample shows how you can call the EnumJob function in the Windows API (winspool.drv). Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above) Author: By Bruce Armstrong Updated: 6/29/2015
Pure PB source code for System Tray Example Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Pure PB source code for counting from 1 to 10, single thread and multi-thread run respectively. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Pure PB source code for extendable multi-threading service. Does not require PFC. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
Pure PB source code for Multithreaded sample application presented at Techselect UK 2007. Development Requirements: IDE: PowerBuilder 12.5
This sample is written in pure powerscript where one or more threads can simultaneously calculate how many prime numbers are between 2 and any number. Development Requirements: IDE: PB 12.5 Author: Roy Kiesler
This sample shows how you can call API (Gdi32.dll, etc.) to achieve comparison between single-thread and multi-thread in the shape of multiple worms moving in the window control. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This sample shows how you can determine a list of running processes using Win32 API(psapi.dll) calls. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This sample shows how you can embed XAML in PB WPF window with PowerBuilder .Net to create a standard calculator. Development Requirements: IDE: PB .NET 12.5
This sample shows how you can use PBDOM to parse the WML syntax in XML document, and to create the corresponding window control/Datawindow control. Development Requirements: IDE: Unknown (Can be upgraded to PB 12.6 or above)
This demo retrieves the width of all data window columns in a PBL by calling the function of the API control (GDI32.DLL) to ensure that they can display all the data in the column. The columnwidthchecker.zip is the PB 12.5 version. The original version that has not been migrated (columnwidthchecker_originalversion.zip) to PB 12.5 is also available. Development Requirements: IDE: PowerBuilder 12.5 or above
This demo shows how you can create a DataWindow dynamically via the predefined DW syntax in XML. Development Requirements: IDE: PowerBuilder 12.5 or above
This sample shows how you can develop a data-driven column gradient bar using pure PowerScript. Development Requirements: IDE: PowerBuilder 12.6 or above
This demo shows how you can use pbm_syscommand to trap the system command values when the user interacts with a DataWindow Control. Development Requirements: IDE:PowerBuilder 11.5 or above
This sample shows how you can work with PostgreSQL using the new PostgreSQL compatibility features of PowerBuilder 2017 R2. You will learn how to use PostgreSQL procedures and functions via RPCFUNC in transaction objects, and use PostgreSQL from a DataWindow, including support for auto-incrementing columns. Development Requirements: IDE: PowerBuilder 2017 R2 or above
Hi All, In case you can't find it, or just need it, I'm sharing here the User Guide for the PowerBuider Compiler (PBC) for PowerBuilder 2017 R3 build 2018. Regards,
Demonstrates methods for calling REST web services using the HTTPClient and RESTClient objects. Also demonstrates how to use the OAuthClient object to handle OAuth authentication.
Demonstrates more advanced use of PostgreSQL, in particular support for Identity Columns, Stored Procedure Datawindows and using stored procedures as methods of the transaction object via RPCFUNC. The database used for the sample is the BookTown database that O'Reilly Media included in their Practical PostgreSQL book. A SQL script that can be used to create the database is https://resources.oreilly.com/examples/9781565928466/blob/master/booktown.sqlavailable from their site .
Demonstrates new PDF features in 2017 R2 and R3, in particular the ability to restrict and password protect the generated document
Demonstrates JSON Import, Export, Merge and Extract
Demonstrates hashing, encoding, symmetric encryption, asymmetric encryption and asymmetric signing
Exports a PowerBuilder project object and then parses it to show how the command line arguments for the command line compiler are generated.
genman32 is a tool that generates an embedded manifest file for .NET COM assemblies for side-by-side (SxS) deployment. https://blogs.msdn.microsoft.com/junfeng/2007/04/14/genman32-a-tool-to-generate-sxs-manifest-for-managed-assembly-for-registration-free-com-net-interop/ It can be used to make assembliens in .NET tht are callable from PowerBuilder without having to install the dll using regasm https://www.brucearmstrong.org/2007/07/calling-dot-net-components-from.html However the original version did not work with .NET framework 4.x. So I have recompiled it to use .NET 4 and included it here NOTE: I do not own the original code. I tried to contact the original author to ask for their permission but I couldn't find them. I hope they wouldn't mind the recompile
A short demo of RESTFul web services consumption using PowerBuilder 2017 R2. This demo connects to Google's Translation services and emulates a quick translation app using RESTFul web services. Note: You will require your own Google Translator API key. You can refer to this site to get one.
This demo shows how to parse a project object so it can be used as arguments for pbc170.exe.
This demo shows how you can use PostgreSQL database with a DataWindow or a DataWindow with a Stored Procedure data source to process data, and how to execute RPC.
This demo shows how to modify the NativePDF properties like ImageFormat, PDFStandard and UsePrintSpec and then save it as a PDF file.
The Server Management Console demonstrates how to develop a visual interface in HTML app to manage various server configurations and runtime status that are exposed by PowerServer 2021. The app is developed with VUE and Element-UI. Key Techniques Demonstrated: Managing license and instance information Managing application settings Managing connection Cache Monitoring active session/transaction Monitoring health status Run Demo: https://dsdemo.appeon.com/psconsolehtml Github Source Code: https://github.com/Appeon/PowerServer-Console-HTML-Example
This application demonstrates various user/identity authentication strategies for securing access to the REST APIs generated by a PowerServer project. The authentication extension on the API Server is developed with .NET Core authentication framework; the PowerBuilder app is developed with PowerBuilder 2021 and deployed with Appeon PowerServer 2021. Key Techniques Demonstrated: IdentityServer4 password authentication IdentityModel JWT password authentication Amazon Cognito password authentication Amazon Cognito authorization code authentication Azure AD password authentication Azure AD authorization code authentication Azure B2C password authentication Azure B2C authorization code authentication Run Demo: https://demo.appeon.com/psrestauthentication/ Source Code: https://github.com/Appeon/PowerServer-Authentication-Example
The PFC Example app demonstrates PowerServer supporting key PFC constructs and programming style commonly used in many existing client/server applications. It is developed with Appeon PowerBuilder 2021 and deployed to the Cloud with Appeon PowerServer 2021. Key Techniques Demonstrated: Applying PFC coding techniques Utilizing PFC feature implementations Utilizing concrete and service class objects Run Demo: https://demo.appeon.com/pfc/ Github Source Code: https://github.com/OpenSourcePFCLibraries/2019
The Sales App demonstrates PowerServer supporting key PowerBuilder constructs and programming style commonly used in many existing client/server applications. It is developed with Appeon PowerBuilder 2021 and deployed to the Cloud with Appeon PowerServer 2021. Key Techniques Demonstrated: Performing CRUD operations using DataWindow Executing SQL statements using ESQL Applying UI Themes Applying RibbonBar control Applying WebBrowser control Integrating Google Charts report Run Demo: https://demo.appeon.com/sales/ Github Source Code: https://github.com/Appeon/PowerBuilder-Sales-Example
Unit Testing sample code from Elevate 2020
DataWindow Converter sample code from Elevate 2020
Web API testing demo from Elevate 2020
Demonstrates how to use the PowerScript converter to create C# from PowerBuilder code. Particularly focuses on database interaction: dwModify Embedded SQL Statements Embedded SQL Stored Procedure Calls Embedded SQL Cursors RPCFUNC Stored Procedure Calls
The Razor Pages app demonstrates HTML app development using DataWindow technology. It is developed in C# with ASP.NET Razor pages and .NET DataStore 2021. Key Techniques Demonstrated: Integrating .NET DataStore in Razor pages Performing CRUD using .NET DataStore Managing transactions using .NET DataStore Async programming using .NET DataStore Run Demo: https://dsdemo.appeon.com/razor Github Source Code: https://github.com/Appeon/.NET-DataStore-Razor-Example
The Angular Pages app demonstrates HTML app development using DataWindow technology and REST API architecture. It is developed using Angular for the presentation layer, and the REST APIs are developed in C# using .NET DataStore 2021. Key Techniques Demonstrated: Integrating RESTful Web API into Angular pages Integrating .NET DataStore into REST APIs Performing CRUD using .NET DataStore Managing transactions using .NET DataStore Async programming using .NET DataStore Run Demo: https://dsdemo.appeon.com/angular/ Github Source Code: https://github.com/Appeon/.NET-DataStore-Angular-Example
he REST API app demonstrates standard RESTful Web API development using DataWindow technology. It is developed in C# with .NET DataStore 2021. Key Techniques Demonstrated: Creating a standard RESTful Web API project Performing CRUD using .NET DataStore Managing transactions using .NET DataStore Async programming using .NET DataStore API Test: https://dsdemo.appeon.com/rest/api/SalesOrderDetail/15 Github Sorce Code: https://github.com/Appeon/.NET-DataStore-Rest-Example
This demo shows how to call Web API from PowerServer. It compares the significant difference in performance between a PowerServer app performing multiple "interrelated" server calls via DW Retrieve and SQL Cursors, and same PowerServer app that instead calls REST API handling C# Datastore retrieve and SQL operations on its own (via objects provided by SnapObjects.Data, such as SQLBuilder and SQLExecutor). To this purpose, C# Web API helps solve performance issues in PowerServer heavy scripts and multiple roundtrips to DB. Complex Business Logic is transferred to the server, while keeping PowerServer as the most effective solution for migrating PB apps to the Web and Mobile platforms with little effort.
The swiping gesture to scroll the data in Appeon Mobile Apps is implemented mainly with the DataWindow’s MouseMove event and a Timing object. Development requirements: PB 2017 or above Server requirements: PowerServer (PB Edition) 2017 or above with AppeonSample DataSource Client requirements: Appeon Workspace 2017 or above
This demo shows how to call Web services from PowerBuilder and PowerServer respectively using the SoapConnection and AppeonWebServiceComponent objects. It also includes sample code on using a Web service as the data source for a DataWindow and how to create a Web service from PowerBuilder.
This demo shows how to implement JSON data import and export functions to a DataWindow with the eon_cjsonnode and eon_cjsonnodearray objects provided in appeon_workaorunds.pbl.
Refer to the sample to understand how to dynamically create datasource on IIS Server.