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 Tabs, Groups, 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

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