extended desktop positioning

BlitzMax Forums/BlitzMax GUI Programming/extended desktop positioning

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi

To place a window in the middle of the desktop, I would use something like the following
x:int = (clientwidth(desktop())-200) / 2
y:int = (clientheight(desktop())-200) / 2
wndw:tgadget = createwindow("hello",x,y,200,200)

That all works well on a single desktop.
Co-ord positions start at the primary monitors top left.

If I extended my desktop to a second monitor, it only works if the primary desktop is in the top left hand corner. (otherwise my second monitor has negative screen co-ords)

Is there a way of detecting that the second monitor is 'before' the first.
working....
+-----+ +-----+
| 1ST | | 2ND |
+-----+ +-----+

not working...
+-----+
| 2ND |
+-----+
+-----+
| 1ST |
+-----+


cheers