Group: Multiple Display Monitors - Library: user32
How to change display settings: screen resolution, screen refresh rate
How to detect if additional monitor is connected and active
BOOL GetMonitorInfo(
HMONITOR hMonitor, // handle to display monitor
LPMONITORINFO lpmi // display monitor information
); DECLARE INTEGER GetMonitorInfo IN user32;
INTEGER hMonitor,;
STRING @ lpmi
hMonitor [in] Handle to the display monitor of interest.
lpmi [out] Pointer to a MONITORINFO or MONITORINFOEX structure that receives information about the specified display monitor.
If the function succeeds, the return value is nonzero.
Returned structure type, MONITORINFO or MONITORINFOEX, is defined by cbSize member set before calling this function. The MONITORINFOEX structure is a superset of the MONITORINFO structure.
hMonitor value can be obtained from a call to either of EnumDisplayMonitors, MonitorFromWindow, MonitorFromPoint, MonitorFromRect.
The EnumDisplayMonitors is unlikely to be used in pure FoxPro code since it requires a callback function.
See also EnumDisplayDevices, EnumDisplaySettings functions.
Home