cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 763 Location: Rockeledge, GA
|
Posted: Sun Jul 04, 2010 8:08 pm Post subject: Single Monitor Dual Screen Behavior |
|
|
For those of us with very widescreen monitors.
Side maximized to dependent on mouse position.
Code: |
rem Errortrap for VDS 5/6 compatibility.
option errortrap,loop
title Single Dual Screen
DIALOG CREATE,Single Dual Screen,-1,0,240,160
dialog add,taskicon,Control
:loop
%%event = @event()
if %%event
goto %%event
end
wait .1
if @equal(%%dual,false)
goto loop
end
if @greater(@mousepos(X),@fdiv(@sysinfo(screenwidth),2))
%%side = right
else
%%side = left
end
if @equal(@winpos(@winactive(),S),3)
gosub maximize
else
end
goto loop
:maximize
window normal,@winactive()
if @equal(%%side,left)
window position,@winactive(),0,0,@name(@fdiv(@sysinfo(screenwidth),2)),@diff(@sysinfo(screenheight),@winpos(#shell_traywnd,H))
else
window position,@winactive(),0,@name(@fdiv(@sysinfo(screenwidth),2)),@name(@fdiv(@sysinfo(screenwidth),2)),@diff(@sysinfo(screenheight),@winpos(#shell_traywnd,H))
end
exit
:controlclick
dialog popup,Dual Screen Mode|Single Screen Mode|Help|About|Exit
goto loop
:dual screen modemenu
%%dual = true
goto loop
:single screen modemenu
%%dual = false
goto loop
:helpmenu
info Not Implemented
goto loop
:aboutmenu
info Program by Brandon Cunningham
goto loop
:exitmenu
:close
exit |
|
|