Skip to content

GuiScreen_Size

See Also: Miscellaneous Functions

Purpose

Returns the height and width of the screen in pixels as a folded integer.

Return Type

Folded Integer

Syntax

Use GlobalFunctionsProcedures.pkg
(GuiScreen_Size({eMode}))

Parameters

  • {eMode}:
  • If {eMode} is 0, GuiScreen_Size returns the width and height, in pixels, of the screen.
  • If {eMode} is 1, GuiScreen_Size returns the width and height, in pixels, of the screen's working area. The working area is the portion of the screen not obscured by the tray (taskbar).

What It Does

GuiScreen_Size returns the height and width of the screen in pixels. The height and width values returned are encoded into a single integer value. The height is stored in the high word and the width is stored in the low word.

Examples

Use GlobalFunctionsProcedures.pkg

Procedure Example
    Integer iSize iHeight iWidth

    Move (GuiScreen_Size(0)) to iSize
    Move (Hi(iSize)) to iHeight
    Move (Low(iSize)) to iWidth
    Send Info_Box ("Screen height = " + String(iHeight) + ;
                    " width = " + String(iWidth)) "Example"
End_Procedure
Move (GuiScreen_Size(1)) to iSize
Move (Hi(iSize)) to iHeight
Move (Low(iSize)) to iWidth
Send Info_Box ("Working Area height = " + String(iHeight) + ;
                " width = " + String(iWidth)) "Example"

Notes

Use the Hi and Low functions to extract the height and width values from the returned folded integer.