Using Win32 functions in Visual FoxPro Image Gallery
Multiple Display Monitors
..msdn
GetMonitorInfo
MonitorFromWindow
Code examples:
How to adjust monitor brightness (Vista, monitor with DDC support)
How to change display settings: screen resolution, screen refresh rate
How to detect if additional monitor is connected and active
MonitorFromWindow
..msdn    Add comment     W32 Constants      Translate this page
Retrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window.
Code examples:
How to change display settings: screen resolution, screen refresh rate
How to detect if additional monitor is connected and active
How to adjust monitor brightness (Vista, monitor with DDC support)
Declaration:
HMONITOR MonitorFromWindow(
  HWND hwnd,       // handle to a window 
  DWORD dwFlags    // determine return value 
);
FoxPro declaration:
DECLARE INTEGER MonitorFromWindow IN user32;
    INTEGER hWindow,;
    INTEGER dwFlags

Parameters:
hwnd
[in] Handle to the window of interest.

dwFlags
[in] Determines the function"s return value if the window does not intersect any display monitor.
Return value:
If the window intersects one or more display monitor rectangles, the return value is an HMONITOR handle to the display monitor that has the largest area of intersection with the window.
My comment:
It might be possible that handles to multiple monitors are not random and start with 0x10001 value.

See also GetMonitorInfo, EnumDisplayDevices functions.
Word Index links for the MonitorFromWindow :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-08-26 10:35:25
Modified: 2004-08-26 10:45:06
Visited in last 7 days: 13
User Contributed Notes:
moorthy | 2007-03-28 07:27:15
I'm in need to change my monitor's resolution from my VFP application to run in different resolutioned monitor.
plz give me some idea to make that my mail id follows
   moorthivina@yahoo.co.in

with regards
moorthi
A.M. | 2007-03-28 09:52:34
Moorthy,

There's a link on top of the page to a code sample in VFP "How to change display settings: screen resolution, screen refresh rate".

Copyright 2001-2014 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.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.198.25.229)
2.33 min.Function: 'GetWindowRect'
Function group: 'Window'
4.53 min.Function: 'GetForegroundWindow'
Function group: 'Window'
17.33 min.Function: 'GetDriveType'
Function group: 'File Management'
Google
Advertise here!