Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

WIndowsDPI

Read Windows DPI Scaling from a Non-HighDPI Aware application

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

WIndowsDPI

Read Windows DPI Scaling from a Non-HighDPI Aware application

Usage: TWindowsDPI contains 2x3 static functions. The GetTrueDPI functions executes the GetDPI functions in a newly created thread that has been made HighDPI Aware and thus circumvents the Windows limitation that only HighDPI Aware applications can read the true value.

TWindowsDPI.GetTrueDPI : Returns the system-level DPI scaling TWIndowsDPI.GetTrueDPI(TMonitor) : Returns the monitor-level DPI scaling for the given monitor TWindowsDPI.GetTrueDPI(TForm) : Returns the monitor-level DPI scaling for the monitor on which the Form is