DesktopDisplay
From Xojo Documentation
Class (inherits from Object)
New in 2021r3
Used to get information about the connected displays.
Properties | ||||||||||
|
Shared Methods | |
|
Shared Properties | ||
|
Notes
Although you cannot create an object of type DesktopDisplay, you can access display objects through the DesktopDisplay class.
Sample Code
The following reports on the values of AvailableLeft, AvailableHeight, AvailableTop, and AvailableWidth for the main display. The value of AvailableHeight takes into account the height of the taskbar (Windows and Linux) and the Dock (macOS). If the user has these tools configured to display on the side, the AvailableWidth property takes them into account.
Var s As String
s = "Left=" + DesktopDisplay.DisplayAt(0).AvailableLeft.ToString + EndOfLine
s = s + "Width=" + DesktopDisplay.DisplayAt(0).AvailableWidth.ToString + EndOfLine
s = s + "Top=" + DesktopDisplay.DisplayAt(0).AvailableTop.ToString + EndOfLine
s = s + "Height=" + DesktopDisplay.DisplayAt(0).AvailableHeight.ToString + EndOfLine
MessageBox(s)
s = "Left=" + DesktopDisplay.DisplayAt(0).AvailableLeft.ToString + EndOfLine
s = s + "Width=" + DesktopDisplay.DisplayAt(0).AvailableWidth.ToString + EndOfLine
s = s + "Top=" + DesktopDisplay.DisplayAt(0).AvailableTop.ToString + EndOfLine
s = s + "Height=" + DesktopDisplay.DisplayAt(0).AvailableHeight.ToString + EndOfLine
MessageBox(s)