var
MonInfo: TMonitorInfo;
begin
MonInfo.cbSize := SizeOf(MonInfo);
GetMonitorInfo(MonitorFromWindow(Handle, MONITOR_DEFAULTTONEAREST), @MonInfo);
ShowMessage(Format('Current resolution: %dx%d',
[MonInfo.rcMonitor.Right - MonInfo.rcMonitor.Left,
MonInfo.rcMonitor.Bottom - MonInfo.rcMonitor.Top]));
end;