RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TScreen.MonitorFromWindow Method

Returns the monitor where a specified window is located.

Pascal
function MonitorFromWindow(const Handle: THandle; MonitorDefault: TMonitorDefaultTo = mdNearest): TMonitor;
C++
__fastcall TMonitor MonitorFromWindow(const THandle Handle, TMonitorDefaultTo MonitorDefault = mdNearest);

Call MonitorFromWindow determine the monitor that displays a specified window. 

Handle is the window handle for the window to be located. 

MonitorDefault indicates how to select a monitor when the window does not fall entirely on a single monitor. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!