I think I'm on the right track with this solution but for some raison it 
feels like a "hack".

My conclusion is that on WinXP changing to Large Fonts doesn't actually 
change the display driver's DPI, it simply does as it says: it increases 
standard fonts. In order to detect rather Large Fonts is enabled or not I'm 
simply reading the height for "Message Box Font" and I'm comparing that to 
the hight for the same font without Large Fonts enabled.

On the few systems I tested the font for the system message box when large 
fonts is NOT enabled is Tahoma 8 point (11 pixels); On the same systems with 
Large Fonts enabled I get Tahoma 10 point (16 pixels).

Considering the user might manually change the fonts to make them larger or 
easyer to read (not necesarily by selecting Large Fonts), scaling the 
application in proportion to the change in hight of this fonts makes sense.

Unfortunatelly automatic scaling of Delphi forms (via the Scaled property) 
seems to work in proportion with the DotsPerInch reading and for this raison 
my forms don't seem to automatically scale on XP.

For anyone interested in this problem take a look at SystemParametersInfo 
with SPI_GETNONCLIENTMETRICS as parameter.

Cosmin Prund wrote:
> I'm looking for a way to detecting rather I'm running on a LargeFonts
> system OR on a normal font system. I googled for "detect large font"
> and found two code samples both trying to detect large fonts using:
>
> DPI := GetDeviceCaps(DC, LOGPIXELSX);
>
> Unfortunatelly this code returns 96 on my WinXP Large Fonts test
> system.
>
> Any idea how to detect this?
> Thanks!
>
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi 

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to