New per-DPI awareness in VCL applications

Posted by on in UI

In RAD Studio 10 Seattle, we've added per-DPI awareness in the VCL. This means that, when moving a form from one monitor to another one that has different DPI, the VCL form and the controls will be rescaled according to the new DPI, with no specific coding needed (video included below).

As a testing scenario, and for this demos: we've setup 3 monitors that have different DPIs:


After that, we ran a sample VCL application and the Visual Studio DPI Awareness Tutorial application side by side. No coding has been added to the VCL app to adapt the form and controls to the different DPIs, there's only code to get and show the monitor's settings.

As you can see in the following screenshots, the VCL window and controls are resized according to the DPI of the monitor where is placed (again, no code needed for this behavior). We've also used the sample application provided by Microsoft to ensure that everything behaved perfectly.

1st monitor: Scaling 100%



2nd monitor: scaling 125%



3rd monitor: scaling 150%



And back to 1st monitor



Bellow there's a video where you can see the application scaling in real-time with precision and no hiccups.


In this file you can find the source code for the Delphi application: DelphiDpiAware

And here it is the Microsoft entry for their testing app:   and the compiled exe:  DPITutorial_exe_VS , please launch adding character p as paramter (to run the Visual Studio sample you may need to install the Visual C++ redistributable packages link:

An absolutely must have feature, now that is more frequent to find environments with monitors with different DPIs.

Gold User, Rank: 16, Points: 206


  • Karel R26519
    Karel R26519 Friday, 14 April 2017

    Nice demo, thank you!
    Just a notice - there is a typo in project name "Delhpi" :-)

  • Derek S8329
    Derek S8329 Monday, 14 September 2015

    What about Rad Studio itself? It is almost unusable on a 4k monitor with 150% scaling (W10).

  • Borja
    Borja Tuesday, 15 September 2015

    There is an unofficial fix under Codecentral:

  • Luis Navarro
    Luis Navarro Tuesday, 15 September 2015

    Hi Derek.
    Thanks for your reply. We are working hard on adding the High-DPI support for the IDE itself. Making the VCL DPI-aware was the first step.

    Best regards.

  • Derek S8329
    Derek S8329 Tuesday, 15 September 2015

    Thanks for the reply. We'll try the temp fix, otherwise I hope the next update will include high dpi for rad studio.

  • Borja
    Borja Monday, 14 September 2015

    Nice demo, Luis!

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: