Screen.ScreenAt
From Xojo Documentation
Method
Screen.ScreenAt(index As Integer) As Screen
New in 2019r2
Supported for all project types and targets.
New in 2019r2
Supported for all project types and targets.
Used to access the properties of a Screen object. Returns a reference to the screen passed.
Syntax
Screen(index).property
Part | Type | Description |
---|---|---|
index | 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
Use this 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 Screen.ScreenCount function to determine how many screens exist.
Examples
This example displays the size of the user's main screen.
MsgBox("Your main screen is " + Str(Screen.ScreenAt(0).Width) + _
" by " + Str(Screen.ScreenAt(0).Height) + ".")
" by " + Str(Screen.ScreenAt(0).Height) + ".")
See Also
Screen class; Screen.ScreenCount property.