Modernize your PowerBuilder Applications

Modal Window

PowerModal allows you to display any window as a modal window, with a faded overlay. The faded overlay brings attention to your modal window while giving your users an indication that your application is in a holding state until it receives input.

PB Ultimate Suite Modal Window Control for PowerBuilder


The easiest way to use PowerModal is to create a global variable for your application:

n_cst_powermodal gnv_modal

The PowerModal object is autoinstantiated, so you can start using it immediately:

w_openemployee lw_mywindow

By default, PowerModal uses the top most window in your application for the message overlay. You can explicitly set the parent window by calling the of_Register method:


If you prefer not to declare a global variable, you can use PowerModal locally:

n_cst_powermodal lnv_modal
w_openemployee lw_mywindow

PowerModal will display your modal window using the properties you set on the window (Title, Min-Max Buttons, Center, Border, Palette Window, etc.). Adjust these properties as necessary. For example, if you don't want your user to move your modal window around the screen, turn the Titlebar off.