As a side note:
system.ScreenWidth and system.ScreenHeight can go a bit crazy on multi-monitor setups that dont use a 1-2-3 lineup of monitors. Those only get the width/height of the primary monitor. To determine 'true' width and height on all screens, try using the following:
Code: vbscript
- sw = System.VScreenWidth
- sh = System.VScreenHeight
However, if you're going to do calculations with this full width, you need to take into account that the left-most pixel wont always be at 0. For example my secondary monitor is on my left, not my right, which means that its left-most pixel is at -1680. This means, in order to place the objects properly 'centered' in the full width, you need to use the proper left-value.
Code: vbscript
- sw = sw / 2
- sh = sh / 2
- scw = System.VScreenLeft + sw
- sch = System.VScreenTop + sh
After this bit, you still need to do the part that centres the object on that point, but that should get ya started on true positioning on multi-monitor setups.
I use a slightly more complex version in this object: Filler