How know if a stack is maximized ?
Derek Bump
list at dreamscapesoftware.com
Tue Oct 9 13:10:09 EDT 2007
Damien,
I've run into the very same problem you are describing. Here is how I
solved the problem on Windows:
1. Download the Externals Collection from the RunRev web site. (It's
unsupported, but it's free now). Attach the external file to your stack.
2. Add the following function and command to your stack.
function maxCardRect
set itemDelimiter to ","
put screenRect() into maxRect
put item 2 of ext_menuSize() into item 4 of maxRect
put queryRegistry("HKEY_CURRENT_USER\Control
Panel\Desktop\WindowMetrics\CaptionHeight") into titleBarSize
put abs(titleBarSize / "15") + 1 into titleBarSize
put titleBarSize into item 2 of maxRect
return maxRect
end maxCardRect
on moveStack
get
setRegistry("HKEY_CURRENT_USER\Software\Company\Stack\ScreenRect",(the
rect of stack "stackName"))
pass moveStack
end moveStack
on resizeStack
get
setRegistry("HKEY_CURRENT_USER\Software\Company\Stack\ScreenRect",(the
rect of stack "stackName"))
pass resizeStack
end resizeStack
3. Add the following code to your loading script. (Ex: preOpenStack,
preOpenCard, etc...)
put queryRegistry("HKEY_CURRENT_USER\Software\Company\Stack\ScreenRect")
into newRect
if (newRect is not empty) and ("-" is not in newRect) then
if newRect = maxCardRect() then get ext_maxWindow() else set the
rect of this stack to newRect
end if
What happens is that the external will find out from the system how
large the Task bar is. Then the script gathers the size of the titlebar
and window borders.
After that, you do a comparison at the stack loading to see if the rect
of the stack window you saved in the registry is the same size as what a
"fullscreen" rect would be.
By the way, what you are asking for is an enhancement request on BugZilla.
Derek Bump
Dreamscape Software
http://www.dreamscapesoftware.com
GIRARD Damien wrote:
> Hi all,
>
> I am searching, but I don't find anything now.
> Does there is a function in Runrev that permit to know if a stack is
> maximized or not ?
>
> Or do I have to do a trick like ever ?
> (if the rect of the stack look like to be maximized, it is maximized).
>
> Thanks,
>
> Damien
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list