Page 1 of 1

how to know 2 monitors are in use?

Posted: Fri Sep 28, 2018 4:33 pm
by richmond62
Someone wrote elsewhere:

"During "development" on Windows with 2 monitors, how to use "set the loc of
this stack to the screenloc" so that a stack centres in on one or the other
monitor? (And, if not in the development environment? say, a standalone?)"

Here is a stack that gives you the location of monitor centres in a way that LiveCode
can use to position stacks in the centres of supplementary monitors.
MIDDLES.livecode.zip
Here's the stack.
(3.69 KiB) Downloaded 19 times

Re: how to know 2 monitors are in use?

Posted: Sat Sep 29, 2018 1:31 pm
by richmond62
Had a rather satisfying fight with my ISP and it got its act together again, so I can upload what I wanted to upload yesterday.
-
Middles.png
-

Code: Select all

on mouseUp
   put empty into fld "VIDZ"
   put empty into fld "VIDZ2"
   put the screenRects into fld "VIDZ"
   put 1 into VDUZ
   repeat until line VDUZ of fld "VIDZ" is empty
      put item 1 of line VDUZ of fld "VIDZ" into VW1
      put item 3 of line VDUZ of fld "VIDZ" into VW2
      put ((VW2-VW1)/2) into WIDD
      put (((VW2-VW1)/2)+VW1) into WIDD2
      put item 2 of line VDUZ of fld "VIDZ" into VH1
      put item 4 of line VDUZ of fld "VIDZ" into VH2
      put ((VH2-VH1)/2) into HITE
      put (((VH2-VH1)/2)+VH1) into HITE2
      put " screen centre at" && WIDD & "," && HITE after line VDUZ of fld "VIDZ"
      put " screen centre at" && WIDD2 & "," && HITE2 after line VDUZ of fld "VIDZ2"
      add 1 to VDUZ
   end repeat
end mouseUp

Re: how to know 2 monitors are in use?

Posted: Sat Sep 29, 2018 9:05 pm
by richmond62
Improved version:
-
MIDDLES2.png
-
MIDDLES.livecode.zip
here's the stack.
(15.41 KiB) Downloaded 24 times