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

</div>

Method

# Screen Method

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

</div>

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

<div class="warning">

<div class="title">

Warning

</div>

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

</div>

## Description

Used to access the properties of a Screen object. Returns a reference to the screen passed.

## Usage

**Screen**(*index*).*property*

| Part     | Type                               | Description                                                                               |
|----------|------------------------------------|-------------------------------------------------------------------------------------------|
| index    | `Integer</api/data_types/integer>` | The number of the screen whose property you wish to read. The main screen is screen zero. |
| property | Any screen object property name    | The property you wish to read. See the description of the Screen class.                   |

## Notes

You can use the Screen function to access the screen properties for the monitors attached to the user's computer. Screen 0 is the main screen. You can use the ScreenCount function to determine how many screens exist.

## Sample code

This example displays the size of the user's main screen.

``` xojo
MsgBox("Your main screen is " + Str(Screen(0).Width) + _
  " by " + Str(Screen(0).Height) + ".")
```

## Compatibility

All project types on all supported operating systems.

## See also

Screen class; `ScreenCount</api/deprecated/screencount>` function.
