From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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.



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.


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.


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.