DesktopWidth()

Syntax

Result = DesktopWidth(#Desktop)
Description
Returns the width for the specified desktop.

Parameters

#Desktop The index of the desktop. Should be always zero as only one web page is active at once.

Return value

Returns the width in pixels. The returned value is DPI independant, which means it's not the real pixel count if the DPI factor is not 1. To get the real pixel count, use @desktopscaledx to scale the result.

Remarks

ExamineDesktops() must be called before using this function to retrieve information about the available desktops.

Example

  ExamineDesktops()
  MessageRequester("Current resolution = " + DesktopWidth(0) + "x" +  DesktopHeight(0) + "x" + DesktopDepth(0))

Example: Real pixel width

  ExamineDesktops()
  MessageRequester("Real physical resolution = " + DesktopScaledX(DesktopWidth(0)) + "x" +  DesktopScaledY(DesktopHeight(0)) + "x" + DesktopDepth(0))

See Also

ExamineDesktops(), DesktopDepth(), DesktopX(), DesktopY(), DesktopHeight()

Supported OS

All

<- DesktopUnscaledY() - Desktop Index - DesktopX() ->