Tech Articles


Building a Web RibbonBar with the WebBrowser Control in PowerBuilder


Introduction

The native RibbonBar control in PowerBuilder, although functional, presents significant limitations regarding visual customization, dynamic themes, and extensibility. With the arrival of the Chromium WebBrowser (WebView2) control in PowerBuilder 2019 R3+, the possibility opens up to build a Ribbon-type toolbar completely rendered in HTML/CSS/JavaScript, achieving a modern, responsive, and fully customizable appearance.

This article demonstrates how to build a reusable Web RibbonBar encapsulated in a User Object (u_wb_ribbon) that inherits from webbrowser. The component allows defining TabsGroups, and Buttons from pure PowerScript, serializing the structure to JSON, injecting it into the web DOM, and receiving back user click events — all using the native bidirectional communication of WebView2.

Read more

Building a RAG (Retrieval-Augmented Generation) System with PowerBuilder


Introduction

Artificial Intelligence is transforming enterprise software development. PowerBuilder developers can now integrate Retrieval-Augmented Generation (RAG) capabilities directly into their applications, enabling an intelligent question-and-answer system based on documents, powered by Large Language Models (LLMs).

This article demonstrates how to build a complete RAG client in PowerBuilder that connects to a Python-based backend with FastAPI. The system allows users to ingest documents, query them using natural language, and receive AI-generated responses with citations to the sources — all rendered in a professional HTML interface using the Chromium WebBrowser control.

Read more

PowerBuilder Equivalents to Windows API Datatypes


At some point in your PowerBuilder career, you will need to call a Windows API (or WinAPI, for short) function. The WinAPI specifications are heavily dependent on type definitions created in C/C++ via the #define preprocessor directive. The use of type defintions helps the readability of Windows code, but it unfortunately and effectively hides the actual underlying datatype - making it difficult for you to correctly code the PowerBuilder external function declaration needed to call the API function.

Some time ago I published a four-part series of PowerBuilder tutorials that explain the ins and outs of interfacting PowerBuilder apps with the Windows API, but I realize the many developers are very busy and do not have the luxury of sufficient spare time needed to read that much material. In case you are interested and have the time, I have included URLs to those tutorials at the end of this article.

This article consists of two tables. The first table lists many of the most commonly-seen WinAPI type definitions and their PowerBuilder equivalents. The second table lists the PowerBuilder datatypes and their WinAPI equivalents, if any. For your convenience, I am also providing the URLs to several useful resources you may find helpful when coding external function declarations.

Read more

PBNI Extension Framework


Addressing the complexities of PBNI

PowerBuilder Native Interface (PBNI) allows developers to extend the capabilities of PowerBuilder by implementing features in C++ or using third-party libraries. However, the traditional process for creating these extensions can be cumbersome.

For a simple sum function with 9 lines of code...

... you have to write 63 lines of code just to make it callable from PowerBuilder and for every change, you have to make PB-specific modifications in three files:

Read more

How to switch from an SCC API SVN client to the native SVN interface


If you have been using the Subversion (SVN) source code control system for your PowerBuilder applications for a while, you have likely been using an SCC API implementation client (such as PBSCC Proxy, PushOK, etc.) to connect PowerBuilder to SVN. If you are considering switching to the native SVN interface provided by PowerBuilder then you probably do not want to lose the history of all the changes you made during all those years of development. Although this is not covered in the PowerBuilder documentation, it is relatively simple to do.

Read more

PowerBuilder Icons


Update on 23-OCT-2024:  The icons have apparently been moved to a new home:

https://www.appeon.com/sites/default/files/pictures/Downloads/CodeSample/PB10_Icons.zip

https://www.appeon.com/sites/default/files/pictures/Downloads/CodeSample/Silk Icons.zip

https://www.appeon.com/sites/default/files/pictures/Downloads/CodeSample/WinXP Icons.zip

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Earlier, one of our members asked about obtaining a set of the PB Classic icons. I've got those, along with two other sets of Icons available for your use. These icons sets are:

 - PB 10 icons

 - the Silk icons

 - the WinXP icons

Read more

Tile Menu Style using Datawindow Object


Updated sample with added features from pbdev.id blog

Have you ever wanted Windows Tile Menu Style on your application? this datawindow object can give you way to have it.
Just add row data to set Image, Text and size of the tile.

Read more

Find Articles by Tag

Testing Export Syntax OLE SQL Server PFC WebBrowser PDFlib PowerServer Mobile OAuth 2.0 Azure Visual Studio Encryption .NET Assembly Git Migration Stored Procedure Trial Event Web API Excel NativePDF RibbonBar API PowerBuilder (Appeon) OAuth DragDrop BLOB Resize Database Table Windows 10 Icons Design XML SDK Script DataType Database Debug Performance PDF PowerServer Web Validation Database Table Schema Source Control Database Object Window Encoding Model Linux OS Mobile Database Profile Interface RibbonBar Builder Service Messagging License TLS/SSL SVN JSONGenerator TreeView Filter Jenkins File Data Text COM SqlModelMapper UI Android MessageBox Sort Menu Event Handling Repository SQL Oracle JSONParser .NET DataStore WinAPI Debugging Import Authentication Web Service Proxy Graph PowerScript (PS) Automated Testing Source Code ODBC Expression PowerBuilder PBVM UI Modernization TFS Array Icon Outlook Configuration RESTClient PBNI UI Themes SqlExecutor External Functions Charts Windows OS OrcaScript DevOps Platform Branch & Merge DataWindow JSON Open Source PowerBuilder Compiler Variable Debugger InfoMaker DataWindow Database Connection SOAP IDE CI/CD Import JSON SnapDevelop Class ActiveX REST Export JSON PostgreSQL Database Painter HTTPClient Authorization iOS CrypterObject Database Table Data Elevate Conference TortoiseGit Application RichTextEdit Control Installation JSON .NET Std Framework Transaction CoderObject Deployment DLL SnapObjects GhostScript Bug Error 32-bit 64-bit PostgreSQL ODBC driver PBDOM Event Handler C#