AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

MonitorFromRect

The MonitorFromRect function retrieves a handle to the display monitor that has the largest area of intersection with a specified rectangle.

VB4-32,5,6
Declare Function MonitorFromRect Lib "user32.dll" (ByRef lprc As RECT, ByVal dwFlags As Long) As Long

VB.NET
System.Windows.Forms.Screen.FromRectangle

Operating Systems Supported
Requires Windows 2000 or later; Requires Windows 98 or later

Library
User32

Parameter Information
· lprc
[in] Pointer to a RECT structure that specifies the rectangle of interest in virtual-screen coordinates.

· dwFlags
[in] Determines the function's return value if the rectangle does not intersect any display monitor.
This parameter can be one of the following values.
MONITOR_DEFAULTTONEAREST
Returns a handle to the display monitor that is nearest to the rectangle.
MONITOR_DEFAULTTONULL
Returns NULL.
MONITOR_DEFAULTTOPRIMARY
Returns a handle to the primary display monitor.

Return Values
If the rectangle 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 rectangle.

If the rectangle does not intersect a display monitor, the return value depends on the value of dwFlags.

Examples

Related Functions

No VB.NET Example Found

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/