TPrintPreview and windows 8

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

TPrintPreview and windows 8

Postby PeterD » 26/02/13 15:45

Hi,

I've been using TPrintpreview for a while and it works perfect, thank you for the product!

I recently came across an issue when using TPrintPreview on a windows8 laptop. When the user has increased the font-size then TPrintPreview does not apply the Screen.PixelsPerInch corredctly.
On a win7 machine, the Screen.PixelsPerInch returns 120 when the font-size is increased to 125%. On windows8 it always returns 96, which makes TPrintPreview fail in showing the canvas correctly.

I found others reporting this issue about windows8 as well. On of the solutions I found was to read the registry HKEY_CURRENT_USER\CONTROL PANEL\Desktop\WindowMetrics which holds the correct value.

I ended up adjusting preview.pas so it reads the value from registry as well. When registry and Screen.PixelsPerInch are not the same, then I take the assumption the value from the registry is the correct one.

So far it seems to be working for me, so I thought to share this information.

Thanks for the great product again!

Peter
PeterD
Member
Member
 
Posts: 1
Joined: 26/02/13 15:33

Re: TPrintPreview and windows 8

Postby Kambiz » 26/02/13 17:55

You're very welcome!

Thanks for sharing this information.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2288
Joined: 07/03/03 19:10
Location: Houten, The Netherlands


Return to DELPHI AREA Products

Who is online

Users browsing this forum: Google [Bot] and 0 guests