Using Win32 functions in Visual FoxPro Image Gallery
Multiple Display Monitors
Code examples:
How to change display settings: screen resolution, screen refresh rate
How to detect if additional monitor is connected and active
..msdn    Add comment     W32 Constants      Translate this page
The GetMonitorInfo function retrieves information about a display monitor.
Code examples:
How to detect if additional monitor is connected and active
How to change display settings: screen resolution, screen refresh rate
BOOL GetMonitorInfo(
  HMONITOR hMonitor,  // handle to display monitor
  LPMONITORINFO lpmi  // display monitor information 
FoxPro declaration:
DECLARE INTEGER GetMonitorInfo IN user32;
    INTEGER  hMonitor,;
    STRING @ lpmi

[in] Handle to the display monitor of interest.

[out] Pointer to a MONITORINFO or MONITORINFOEX structure that receives information about the specified display monitor.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
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.
Word Index links for the GetMonitorInfo :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2004-08-26 10:27:57
Modified: 2004-08-26 10:38:40
Visited in last 7 days: 76
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
6 sec.
Function group: 'GDI+ Font'
11 sec.Function: 'GetLengthSid'
17 sec.Function: 'GetKeyboardLayout'
23 sec.Function: 'GetCurrentDirectory'
28 sec.Function: 'GetAdaptersAddresses'
34 sec.Function: 'GdipCreateFromHDC'
40 sec.
Function group: 'Shell Lightweight Utility APIs -- Path Functions'
46 sec.Function: 'GetDlgItem'
51 sec.Function: 'GdipSaveImageToFile'
55 sec.
Function group: 'Simple MAPI'
Advertise here!