R – Delphi apps, form size varies on different machines

delphiformssize

I've got a Delphi 7 app, on the WinXP development machine the form size is the same as it was designed.

However, running the app on a Vista machine, some forms have been enlarged 20-30%, leaving big blank spaces on the right and bottom edge of forms.

On one of our client's WinXP machine, the forms have shrink, causing scroll bars to show up on the forms.

On most other machines, it shows up OK.

The app does remember the form size that was last used on some forms, and uses it next time the form is opened, however even removing these settings, the default form size is still different to how it was designed.

Any ideas?

Best Answer

This sounds like 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, and your "symptoms" sound like this could be what's going on in your case.

But all is not lost! 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.

Related Topic