procedure TMainForm.ShowMeasures(const header: String = '');
var
fmtMeasures: String =
'Screen:'+LineEnding
+ '- Width,Height: %d x %d'+LineEnding
+ '- Desktop W/H : (%d,%d) %d x %d'+LineEnding
+ '- Workarea W/H: (%d,%d) %d x %d'+LineEnding
+'Monitor:'+LineEnding
+ '- L,T WxH : (%d,%d) %d x %d'+LineEnding
+ '- Workarea : (%d,%d) %d x %d'+LineEnding
+'Form:'+LineEnding
+ '- L,T WxH : (%d,%d) %d x %d'+LineEnding
+ '- ClientRect : (%d,%d) %d x %d';
MWARect: TRect;
begin
MWARect := Monitor.WorkareaRect;
if header <> '' then
fmtMeasures := header + LineEnding + fmtMeasures;
ShowMessageFmt(fmtMeasures,
[Screen.Width, Screen.Height,
Screen.DesktopLeft, Screen.DesktopTop,
Screen.DesktopWidth, Screen.DesktopHeight,
{-----}
Screen.WorkAreaLeft, Screen.WorkAreaTop,
Screen.WorkAreaWidth, Screen.WorkAreaHeight,
{=====}
Monitor.Left, Monitor.Top, Monitor.Width, Monitor.Height,
MWARect.Left, MWARect.Top, MWARect.Width, MWARect.Height,
{=====}
Left, Top, Width, Height,
ClientRect.Left, ClientRect.Top, ClientRect.Width, ClientRect.Height
]);
end;