> From: Klaus Major <[EMAIL PROTECTED]>
> Subject: two monitors
>
> Hi folks,
>
> has anyone an idea on how to detect a second monitor with MC?
>
> The screenrect only returns the rect of the main-monitor
> (the one with the menubar).
>
First off, what platform are you running under? I am running under Win32
(MC 2.3.2) and I use the following code in my script to detect how many
monitors I am running under. If I have two monitors (stacked vertically) I
put each of two stacks on separate monitors. If I have only one monitor I
put both on the same monitor.
# How many monitors do we have? Each monitor set to 1024 x 768
put (item 4 of the screenRect) div 768 into monitorCount
if item 4 of the screenRect < 768 then put 1 into monitorCount
set the width of wd "ADM High" to 1024
set the height of wd "ADM High" to 768
set the topLeft of wd "ADM High" to 0,0
set the width of wd "Level one maps" to 1024
set the height of wd "Level one maps" to 768
if monitorCount > 1 then
set the location of wd "Level one maps" to (1024 div 2), (768 + 384)
else
set the location of wd "Level one maps" to the screenLoc
end if
> Too bad that the backdrop only "backdrops" the main-monitor ;-)
>
I don't use the backdrop. I use a separate startup stack that I can control
the dimensions of. This way I can detect a click on my pseudo-backdrop.
set the decorations of wd "Start ADM High" to empty
if item 4 of the screenRect >= 1536 then
# Make the pseudo-backdrop cover both monitors
set the height of wd "Start ADM High" to 1536
else
# Only need the pseudo-backdrop to cover the one monitor
set the height of wd "Start ADM High" to 768
end if
set the width of wd "Start ADM High" to item 3 of the screenRect
set the topLeft of wd "Start ADM High" to 0,0
> Any suggestions are very appreciated.
>
>
> Regads
>
> Klaus Major <[EMAIL PROTECTED]>
> MetaScape GmbH
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.