We have a few legacy applications that were written in Delphi 7. We've had a few requests over the years to support custom desktop dpi settings in these applications but we have been able to dodge the bullet up till know. Well we can't anymore.
When users set their desktops to say 120dpi some of the controls "fall off" the application or stretches beyond the visible are of the form and specifically the ones that are anchored to the right edge of their parent.
What can I do to prevent this problem WITHOUT open heart surgery.
As you probably know, this is a well known issue with Delphi forms and interactions with system font sizes.
The default behaviour of a Delphi form is to attempt to scale to respect the (runtime) user's desktop environment. This can have unintended and undesirable side effects however, as you have found.
But the Scaled property (TRUE by default) can be set FALSE to prevent this, but I recommend you read that first article, and also consider the information in this article in order to determine whether this is the right solution in your case.
If you're lucky, simply setting Scaled to FALSE on all your forms may get you a good way there, if not all the way (which may be tedious, but is not exactly open-heart surgery).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With