GetMonitorInfo Method (CLIENT)
10.0A
The GetMonitorInfo method provides monitor information for one or more display monitors on a Windows workstation. The method uses the following format:
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A CLIENT object.
return
Optional. A Character String Variable that receives the monitor information.
options
Optional. A Numeric Variable or decimal number that specifies a bit mask value that controls the operations of this method.
Flags Affected: EOS, OVER, ZERO
Note the following:
The EOS flag is set if the returned field data string must be truncated before being stored into the {return} Character variable.
The ZERO flag is always cleared.
The OVER flag is always cleared.
The optional {options} bit mask values change the execution behavior of the GetMonitorInfo method as follows:
|
Option |
Returns |
|
0x0 |
The default value which returns the data for all known monitors. |
The {return} character string contains monitor information that is formatted as follows:
"{hwnd},{type},{top},{bottom},{left},{right};{hwnd1},..."
Where:
Example return value using single display monitor:
"65537,1,0,1050,0,1680;"
'65537' is the HMONITOR handle
'1' indicates this is the Primary monitor.
'0' is the top coordinate value of the monitor.
'1050' is the bottom coordinate value of the monitor.
'0' is the left coordinate value of the monitor.
'1680' is the right coordinate value of the monitor.
Example using dual display monitors:
"65537,1,0,1080,0,1920;65539,0,0,1080,-1920,0;"
'65537' is the HMONITOR handle
'1' indicates this is the Primary monitor.
'0' is the top coordinate value of the monitor.
'1080' is the bottom coordinate value of the monitor.
'0' is the left coordinate value of the monitor.
'1920' is the right coordinate value of the monitor.
----------
'65539' is the HMONITOR handle of a secondary monitor
'0' indicates this is not the Primary monitor.
'0' is the top coordinate value of themonitor.
'1080' is the bottom coordinate value of the monitor.
'-1920' is the left coordinate value of the monitor. The negative value indicates that this secondary monitor is located to the left of the primary monitor for the Windows virtual screen.
'0' is the right coordinate value ofthe monitor.
When using the PWS runtime, the 'GetMonitorInfo' method returns client browser screen object information. In this case, the monitor information only provides single monitor data as found in the browser screen object.
Example using PWS client browser:
"0,1,0,1050,0,1680;"
'0' is always zero for the HMONITOR handle.
'1' is always one for the Primary monitor.
'0' is the top coordinate value which is always zero.
'1050' is the bottom coordinate value of the monitor identified by the height retrieved from the browser screen object.
'0' is the left coordinate value which is always zero.
'1680' is the right coordinate value of the monitor identified by the width retrieved from the browser screen object.
Example code using 'GetMonitorInfo':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See Also: CLIENT, Client Methods, Method Syntax
![]() |