[Lazarus] Detecting desktop area size

Bart bartjunk64 at gmail.com
Thu Mar 31 10:09:22 CEST 2011


On 3/31/11, zeljko <zeljko at holobit.net> wrote:
> GetMonitorInfo(), GetSystemMetrics() SM_CXSCREEN,
> SM_CYSCREEN,SM_CXVIRTUALSCREEN,SM_CYVIRTUALSCREEN doesn't help ?

On Windows GetSystemMetrics does return the size the (virtual) desktop
has, but it does not subtract the space occupied by the Windows
TaskBar (see: http://msdn.microsoft.com/en-us/library/ms724385(v=vs.85).aspx).
You have to use SystemparametersInfo(SPI_GETWORKAREA, 0, @WorkArea, 0
); with WorkArea being of type TRect;

Bart




More information about the Lazarus mailing list