Notice Of Closure

Please note that this website is due to close down on 15th June 2020.

In the interim I will try to move as much content as possible over to my GitHub account. Thanks to everyone who has supported the site over the years.

» Help

How to determine the screen resolution


There are two ways to determine the screen's height and width.

Use the global Screen variable

Screen.Height { Screen height in pixels }
Screen.Width  { Screen width in pixels  }

Use the Windows API GetSystemMetrics() function

This function can be useful in applications that don't use the VCL like console applications.

GetSystemMetric(SM_CXSCREEN) { Screen height in pixels }
GetSystemMetric(SM_CYSCREEN) { Screen width in pixels  }
Author: Unknown
Added: 2007-06-02
Last updated: 2007-06-02

« Return to contents »