[DUG] Large Fonts/DPI

Laurence Bevan Laurence at master.co.nz
Wed Aug 9 12:14:21 NZST 2006


Hi John,

Yes the PixelsPerInch refers to a form property, and this code should be in the FormCreate. This
code doesn't detect, it purely says if the form pixelsperinch is not the same as the screen's then
scale by the factor of screenpixels to formpixels (e.g. 120 / 96).

If this is a major issue for you then I suggest you save yourself time and grief by buying one of
the components available. There are so many issues around screen resolution and normal/large fonts
that you'll send weeks trying to get your head around it (much easier to drop a component in that
fixes it all).

Laurence Bevan


----- Original Message -----
From: John Bird
To:  "'NZ Borland Developers Group - Delphi List'" <delphi at ns3.123.co.nz>
Sent:  Wed, 9 Aug 2006 12:04:03 +1200
Subject: RE: [DUG] Large Fonts/DPI

In your code below the second PixelsPerInch - is that a form property? 

Eg   if Screen.PixelsPerInch <> form1.PixelsPerInch then

Because I tried to use this code above to detect when a user has a non 96PPI
screen, and it didn't work.  I am guessing the reason is that I let the
application create the forms on startup and when I test using this code the
form is already created and the test above then returns true (they are
equal) - but I am guessing....

John




More information about the Delphi mailing list