Claus Dreischer wrote:
is there a way to determine the size of the window decorations (the
stuff the OS is painting around my stack)?
I would like to move my stack into the upper left corner, but without
the knowledge of the real height of the whole window (stack + window
decorations), i don't know how much i should add to the height of this
stack.
This also depends on the window style (classic 2000, XP, Vista, etc).
Is there a way?
On Mac the window size isn't customizable, so you can measure a screen
shot and be done with it.
For Windows, Klaus' list is very helpful for the default values, but
because those can be adjusted by the user in their Control Panel it may
be better to work from the registry setting for that.
Here's a snipped of a routine I use to place windows(be mindful of email
text wrapping):
if last word of the systemVersion >= 6 then
get queryRegistry("HKEY_CURRENT_USER\Control
Panel\desktop\WindowMetrics\PaddedBorderWidth")
else
get queryRegistry("HKEY_CURRENT_USER\Control
Panel\desktop\WindowMetrics\BorderWidth")
end if
if (it is not a number) or ( it = 0) then put 1 into g4WWinMargin
else
put round(it / -15) into g4WWinMargin
end if
Note that the reg key used differs by OS version. An unnecessary drag,
IMO, and cost me a bit of time turning it up when Vista came out, but
good to know when you need it.
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode