msd 5 Posted June 9, 2022 Hello, I have one big project and I migrated it from older versions of Delphi to the latest Delphi 11.1. High-DPI is one of the unsolved issues. When I start the app on a computer which has activated zoom over 100% (High-DPI screen), the whole components are in a mess on all forms. So, how to solve this scenario so that my app can keep resolution and aspect ratio every time in every zoom factor on the client's PC? Thanks for the help and support in advance. Share this post Link to post
Uwe Raabe 2064 Posted June 9, 2022 Start Delphi 11 (DPI Unaware) from your Window start menu 1 Share this post Link to post
corneliusdavid 220 Posted June 9, 2022 The quick and lazy way to handle this is to turn off the Scaled property in all your forms but then all your controls will be really tiny when the Windows scaling is cranked up. What you'll need to do is change several aspects of your forms to gracefully rearrange themselves as heights and widths change. Notice I didn't say "re-design" your forms but it does take some work. Get to know the Align and Anchors properties first. Consider using container components that automatically rearrange components but keep them in their place like the TFlowPanel and TGridPanel. There are many other things you can do--a quick internet search will reveal many blog posts and articles over the years. Here's a good starting point: https://zarko-gajic.iz.hr/writing-and-enabling-delphi-application-to-support-high-dpi-displays-and-4k-screen-resolutions/ 1 1 Share this post Link to post
msd 5 Posted June 9, 2022 Hello Uwe, Delphi is not a problem; it works fine. The problem is compiled applications and distributed on computers with high-DPI screens. I need to solve deployed applications... Thanks anyway for the advice. Share this post Link to post
Lajos Juhász 295 Posted June 9, 2022 7 minutes ago, msd said: Delphi is not a problem; it works fine. Please send me a copy of D11.1 that works fine. I did my best to support highDPI unfortunately I see no way to do that with D11.1 maybe in D14 will work. 1 1 Share this post Link to post
Uwe Raabe 2064 Posted June 9, 2022 1 minute ago, Lajos Juhász said: I see no way to do that with D11.1 I have several applications running fine on High DPI (even built with D10.4), but that may just depend on the specific applications. Just to give a rough estimate: It took me about six weeks to get MMX Code Explorer working with D10.4 and there are still glitches like cut-off texts or overlapping controls. Most of them are not Delphi related, but lie in the nature of scaling integer values. Share this post Link to post
Der schöne Günther 316 Posted June 9, 2022 Without more context, it's impossible to say what is wrong in your case. I was very pleasantly surprised when I updated on of our XE7 applications to 10.4 in order to support High DPI. It took me a few days, but everything seemed logical (I had to make a few small changes where the UI used a hard coded number of pixels) - And in the end, it turned out to be great. Share this post Link to post
Fr0sT.Brutal 900 Posted June 9, 2022 I too adopt a very old app to be DPI-aware and even on D7 scaling works pretty well. I just had to ensure AutoScroll is False, Scaled is True and Client H and W <> 0 and set the main font to system one. Several remaining glitches could be fixed by giving more space. However I don't use much of 3rd party controls. F.ex., I recall VirtualTreeView has had scaling issues for long long time. Share this post Link to post
Attila Kovacs 631 Posted June 11, 2022 On 6/9/2022 at 4:29 PM, corneliusdavid said: What you'll need to do is change several aspects of your forms to gracefully rearrange themselves as heights and widths change. Notice I didn't say "re-design" your forms but it does take some work. Get to know the Align and Anchors properties first. Consider using container components that automatically rearrange components but keep them in their place like the TFlowPanel and TGridPanel. wth? Share this post Link to post
Incus J 10 Posted June 14, 2022 Der schöne Günther mentioned context. A couple of questions come to mind that might help in homing in on the issue: On 6/9/2022 at 3:05 PM, msd said: I have one big project and I migrated it from older versions of Delphi to the latest Delphi 11.1 Did you run the Delphi 11 IDE in HiDPI mode while migrating the VCL project? (Is your own development environment HiDPI?) On 6/9/2022 at 3:05 PM, msd said: When I start the app on a computer which has activated zoom over 100% (High-DPI screen) Which version of Windows is that computer running (e.g. 7, 8, 10, 11) ? Share this post Link to post