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

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