Screen.ScreenCount
From Xojo Documentation
Read-Only Property (As Integer )
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.
Var myScreens As Integer
myScreens = Screen.ScreenCount
If myScreens = 1 Then
MsgBox("You have only one display.")
Else
MsgBox("You have " + Str(myScreens) + " displays!"
End If
myScreens = Screen.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.ScreenAt function.