From Xojo Documentation

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

Read-Only Property (As Integer )
IntegerValue = aScreen.ScreenCount

New in 2019r2

Supported for all project types and targets.

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



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


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


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.")
MsgBox("You have " + Str(myScreens) + " displays!"
End If

See Also

Screen class; Screen.ScreenAt function.