Screen.LastScreenIndex
From Xojo Documentation
Read-Only Property (As Integer )
The index of the last screen connected to the user's computer. Screen 0 is the main screen.This can be useful when you need to loop through the user's screens.
Example
This example finds the maximum screen depth of all screens connected to the user's computer: