Economy-x-Talk - Sample Scripts
Center Window on Screen
The screenRect is the rect of the current card window's screen; this script calculates the width of the rect to center the window, since the screen's upper left may be not at 0,0. This way we avoid wrong results on multiple-screen systems.
-- M. Uli Kusterer
on centerwin theWindow
put the screenrect into sr
put item 3 of sr -item 1 of sr into wWidth
put item 4 of sr -item 2 of sr into wHeight
put item 1 of sr +wWidth div 2 into X
put item 2 of sr +wHeight div 2 into Y
set the loc of window theWindow to X,Y
end centerwin
Keep this extensive resource of tutorials and samples on-line! Support RunRev.info!
| Yes, this script is useful. I make a donation and choose freely how much I want to donate on-line (PayPal). Click here if you want to make a donation in dollars. | This script has not (completely) solved my problem and I want Economy-x-Talk to take care of it. Let me contact you. |
Copyright©2002-2008 by Mark Schonewille, Nijmegen, the Netherlands. This web site is in no way affiliated with Runtime Revolution Ltd., but we do recommend the Revolution development platform.