Gambas Documentation - /comp/gb.qt4/desktop

/comp/gb.qt4/desktop

# Desktop (gb.qt4)

This class is used to get information about the desktop and the screen.

This class is static.

Static properties | Static methods | Constants
--- | --- | ---

A synonymous of the Height property.
H
Return if the desktop has a system tray.
HasSystemTray
Return the height of the usable desktop rectangle displayed on the default monitor.
Height
Returns the desktop screen resolution in DPI.
Resolution
Returns half of the height of the default desktop font in pixels.
Scale
A synonymous of the Width property.
W
Return the width of the usable desktop rectangle displayed on the default monitor.
Width
Return the left coordinate of the usable desktop rectangle displayed on the default monitor.
X
Return the top coordinate of the usable desktop rectangle displayed on the default monitor.
Y

Return a screenshot of the desktop as a Picture object.
Screenshot

Returns the charset used by the graphical interface for displaying text.
Charset

### Examples

    'This example displays desktop properties in a message box. It formats the message using rich text.

    PUBLIC SUB ButtonProperties_Click()
      DIM p AS String
      p = "<h2>Desktop Properties</h2>"
      p &= "Charset <b>" & Desktop.Charset & "</b>"
      p &= "<br>Height <b>" & Desktop.Height & "</b>"
      p &= "<br>Resolution <b>" & Desktop.Resolution & "</b>"
      p &= "<br>Scale <b>" & Desktop.Scale & "</b>"
      p &= "<br>Width <b>" & Desktop.Width & "</b>"
      Message.Info(p)
    END