Aktiven Monitor der App erkennen (macOS, Windows)

Hi, welche Möglichkeiten gibt es in XOJO den aktiven Monitor zu erkennen, in dem die App läuft? Habt ihr eine Idee? Aus der XOJO Doku geht das nicht hervor.

Versuch es mal damit:

'set the rect
dim theRect as REALbasic.Rect
if isNewPrefs then
  theRect = new REALbasic.Rect(100, 100, ParentWindow.Width, ParentWindow.Height) 'dummy values
else
  theRect = new REALbasic.Rect(PrefValueLeft, PrefValueTop, PrefValueWidth, PrefValueHeight)
end if

'Find screen.
Dim screenID as integer
For l as integer = 0 to screenCount - 1
  if theRect.top >= screen(l).top and theRect.center.x > screen(l).left and theRect.center.x < (screen(l).left + screen(l).width) then screenID = l
next
Dim ShowOnScreen as screen = screen(screenID)