DesktopDisplay.DisplayAt

From Xojo Documentation

Revision as of 19:12, 23 July 2021 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

DesktopDisplay.DisplayAt(index As Integer) As DesktopDisplay

New in 2021r3

Supported for all project types and targets.


Used to access the properties of a DesktopDisplay object. Returns a reference to the display passed.

Syntax

Screen(index).property

Part Type Description
index Integer The number of the display whose property you wish to read. The main display is display zero.
property Any display object property name The property you wish to read. See the description of the DesktopDisplay class.

Notes

Use this function to access the display properties for the monitors attached to the user's computer. Display 0 is the main screen. You can use the DesktopDisplay.DisplayCount function to determine how many screens exist.

Examples

This example displays the size of the user's main display.

MessageBox("Your main display is " + DesktopDisplay.DisplayAt(0).Width.ToString + _
" by " + DesktopDisplay.DisplayAt(0).Height.ToString + ".")

See Also

DesktopDisplay class; DesktopDisplay.DisplayCount property.