Delphi applications, form size varies on different machines

I have a Delphi 7 application, on a WinXP development machine, the size of the form is the same as when developing.

However, when running the application on a Vista machine, some forms were enlarged by 20-30%, leaving large gaps in the right and bottom edges of the forms.

On one of our WinXP client machines, the forms are compressed, resulting in scrollbars on the forms.

On most other machines, it displays OK.

The application remembers the size of the form that was last used in some forms and uses it the next time the form is opened, however, even by removing these settings, the default size of the form is still different from how it was created.

Any ideas?

+2


source to share


3 answers


This sounds like a known issue with Delphi forms and system font size interactions .

Delphi's default behavior is to attempt to scale to comply with the user's desktop environment (runtime). However, this can have unintended and unwanted side effects, and your "symptoms" sound like they are happening in your case.



But all is not lost! The Scaled property (default TRUE) can be set to FALSE to prevent this, but I recommend that you read this first article and also review the Information in this article to determine if this is the right solution for your case.

+11


source


Big fonts and small fonts on a Vista machine maybe?



+1


source


Use this code in the OnCreate event for each of your forms:

if Win32Platform = VER_PLATFORM_WIN32_NT then Font.Name: = 'MS Shell Dlg 2' else Font.Name: = 'MS Shell Dlg';

0


source







All Articles