MonitorInfo Method (WINDOW)
9.3A, PLBCMP GUI Only
The MonitorInfo method retrieves information that is useful when multiple monitors are being used. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A WINDOW object that is evalulated.
return
Optional. A Character String Variable that returns delimited data fields for the monitor data.
flags
Optional. The method option flags as described below.
hwnd
Optional. The {hwnd} value is a handle to a window that determine the display monitor information.
Flags Affected: EOS
Note the following:
The numeric coordinate values can be negative.
The numeric coordinate values can be eleven characters long including the minus sign.
The EOS flag is set TRUE when the destination variable is too small to receive all of the data.
The fields are delimited using a comma (,).
There are two basic sets of rectangle data returned by the method. The first rectangle data is the display monitor rectangle and the second is the display work area rectangle. The difference between the two rectangle sets is the height of the taskbar when it is on the bottom or top and it is the width of the taskbar when it is on the left or right of the monitor screen.
The rectangle data values can be negative and the values are provided as virtual screen coordinates.
The returned data is defined as follows:
Where:
{primary}
One numeric character where a value of one (1) indicates that the monitor data is for the primary monitor. If the value is zero (0), the monitor data is for a monitor other than the primary.
{dT}
A numeric value that is the top coordinate value for the monitor display rectangle.
{dB}
A numeric value that is the bottom coordinate value for the monitor display rectangle.
{dL}
A numeric value that is the left coordinate value for the monitor display rectangle.
{dR}
A numeric value that is the right coordinate value for the monitor display rectangle.
{wT}
A numeric value that is the top coordinate value for the monitor work area rectangle.
{wB}
A numeric value that is the bottom coordinate value for the monitor work area rectangle.
{wL}
A numeric value that is the left coordinate value for the monitor work area rectangle.
{wR}
A numeric value that is the right coordinate value for the monitor work area rectangle.
Example of a returned string:
The numeric coordinate values can be negative.
The numeric coordinate values can be eleven characters long including the minus sign.
The EOS flag is set TRUE when the destination variable is to small to receive all of the data.
The {flags] value determines this method's return value if the window does not intersect with any display monitor. If the {flags} value is not specified, the default behavior is the same as $MONITOR_DEFAULTTONULL. The {flags} value can be one of the following:
|
Value |
Keyword |
The data .. |
|
0x0 |
$MONITOR_DEFAULTTONULL |
is returned as a NULL variable. |
|
0x1 |
$MONITOR_DEFAULTTOPRIMARY |
contains the data for the primary display monitor. |
|
0x2 |
$MONITOR_DEFAULTTONEAREST |
contains the data for the display monitor that is nearest to the window. |
If the {hwnd} value is not specified, the default value is the handle for the {object} WINDOW. A PLB program can use the HWND property to get the handle to a WINDOW object that is to be used.
This method is not available when using the PL/B Web Server.
See Also: Method Syntax, WINDOW Methods
![]() |