<div class="meta" robots="noindex">

</div>

Method

# ScreenCount

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `DesktopDisplay.DisplayCount<desktopdisplay.displaycount>` as a replacement.

</div>

## Description

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

## Usage

*result*=**ScreenCount**

| Part   | Type                               | Description                                                          |
|--------|------------------------------------|----------------------------------------------------------------------|
| result | `Integer</api/data_types/integer>` | Any container expecting an `Integer</api/data_types/integer>` value. |

## Notes

The <span class="title-ref">ScreenCount</span> function returns the number of screens (monitors) connected to the user's computer (Windows and Macintosh). On Linux, <span class="title-ref">ScreenCount</span> always returns 1.

## Sample code

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

``` xojo
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
```

## Compatibility

All project types on all supported operating systems.

## See also

`DesktopDisplay</api/user_interface/desktop/desktopdisplay>` class; `DesktopDisplay.DisplayAt<desktopdisplay.displayat>` function.
