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:

 

[label]

{object}.MonitorInfo

[GIVING {return}] USING [*Flags=]{flags}:

 

 

[*Hwnd=]{hwnd}

 

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:

  1. The numeric coordinate values can be negative.

  2. The numeric coordinate values can be eleven characters long including the minus sign.

  3. The EOS flag is set TRUE when the destination variable is too small to receive all of the data.

  4. The fields are delimited using a comma (,).

  5. 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.

  6. The rectangle data values can be negative and the values are provided as virtual screen coordinates.

  7. The returned data is defined as follows:

  8.  

    {primary},{dT},{dB},{dL},{dR},{wT},{wB},{wL},{wR}

    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:

     

    "1,0,960,0,1280,0,930,0,1280"      //Primary monitor

    "0,0,960,0,1280,0,930,0,1280"      //Not primary monitor

     

  9. The numeric coordinate values can be negative.

  10. The numeric coordinate values can be eleven characters long including the minus sign.

  11. The EOS flag is set TRUE when the destination variable is to small to receive all of the data.

  12. 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:

  13.  

    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.

     

  14. 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.

  15. This method is not available when using the PL/B Web Server.

 

 

See Also: Method Syntax, WINDOW Methods

 



PL/B Language Reference MDIShow Method (WINDOW) MouseWheelMode Method (WINDOW)