ScreenCount

From Xojo Documentation

Method

Used to determine the number of screens connected to the user’s computer.

Syntax

result=ScreenCount

Part Type Description
result Integer Any container expecting an Integer value.

Notes

The ScreenCount function returns the number of screens (monitors) connected to the user's computer (Windows and Macintosh). On Linux, ScreenCount always returns 1.

Examples

This example reports on the number of monitors attached to the user's computer.

Dim myScreens As Integer
myScreens = ScreenCount
If myScreens = 1 Then
MsgBox("You have only one display.")
Else
MsgBox("You have " + Str(myScreens) + " displays!"
End If

See Also

Screen class; Screen function.