Supporting Per-Monitor (V2) DPI Awareness

DPI awareness is essential for maintaining a consistent and visually accurate user interface. It ensures that all Ul elements automatically scale proportionally according to Windows display scaling settings, providing a clear and well-balanced appearance across monitors with different resolutions and DPI values.

In the following DPI scaling modes provided by Microsoft, PowerBuilder has optimized its DPI-aware scaling logic to work with the "Per-Monitor (V2) DPI Awareness" mode.

Which means, only the "Per-Monitor (V2) DPI Awareness" mode can benefit from PowerBuilder's optimization.

  • DPI Unaware -- (1) No scaling support, static at 96 DPI.

  • System DPI Awareness -- (2) Scales based on system DPI, but doesn't adjust dynamically for different monitors.

  • Per Monitor (V1) DPI Awareness -- (3) Scales based on the DPI of the monitor the app is on.

  • Per-Monitor (V2) DPI Awareness -- (4) Full dynamic scaling based on the monitor and window state.

  • DPI Unaware GDI Scaled -- (5) GDI scaling applied when running on high-DPI displays, but not ideal quality.

For more about automatic DPI scaling management provided by Microsoft, please refer to Microsoft's documentation: High DPI and DPI_awareness_context.

If you select the Per-Monitor (V2) DPI Awareness mode, the DPI scaling in your application will be handled by PowerBuilder together with Windows OS:

PowerBuilder Windows OS

PowerBuilder will handle DPI scaling for the following UI elements:

  1. PowerBuilder windows

  2. PowerBuilder native controls

  3. Any other Ul elements that are not handled by Windows OS.

Windows OS will handle DPI scaling for the following UI elements:

  1. Automatic non-client area (window caption, scroll bars, etc.)

  2. Win32 dialogs (e.g. from PowerBuilder MessageBox)

  3. Theme-drawn bitmap assets in common controls (checkboxes, button backgrounds, etc.)


Note

If you select the other DPI scaling modes (such as System DPI Awareness, Per Monitor (V1) DPI Awareness), PowerBuilder does NOT provide additional optimization; and your application will rely entirely on Windows OS for automatic scaling.

Please run comprehensive testing to ensure that the scaling results meet your expectations.