Adjusting Positon Of a Desktopx object.............Tell me please please please
Thursday, June 26, 2008 by swapna alice | Discussion: WinCustomize Talk
Please tell me how to adjust position of a desktopx object so that it remain at center for every resolution....
Is this right...........
Horizontally..........Center
Vertically..............Center
When i Applied these settings for my widget, it wasn't at center perhaps size of animation = 3200x2400 was too big for resolution supported by my pc...but why that was not at center.......
Ok I'll resize the animation, but I need to put that object at center...
Please help me out.....
Thanks in advance...........
Reply #2 Thursday, June 26, 2008 11:57 AM
Thanks for your reply
Reply #3 Thursday, June 26, 2008 1:05 PM
I am curious though, what type of object is it, what does it do?
If you look at the ones that are in the gallery library I don't remember seeing any that have a desktop position set. They seem to be made to be put in a position that suites the desktop theme.
There is a function option in properties that allows you to set movement of the object or widget.
Reply #4 Thursday, June 26, 2008 1:27 PM
I wish I had the expertise to help write the script . . (and I'll hack at it a bit) . . but I hope this helps some.
System.VscreenLeft, System.VScreenTop, System.VScreenWidth, System.VScreenHeight
These are the suggested properties to use when checking the monitor
coordinates, since they take in consideration the whole virtual screen area, and
not only the primary monitor. This will still work in a single monitor setup but
will also support multi-monitor setups.
Note that the virtual screen origin is NOT generally (0,0), but it is
(VscreenLeft, VscreenTop). Because of this .VscreenWidth returns the WIDTH of
the virtual screen, not the right border! To calculate the right and bottom
borders use the following code:
VirtualScreenRight = System.VScreenLeft + System.VScreenWidth
VirtualScreenBottom = System.VScreenTop + System.VScreenHeight
Object.Top, Object.Bottom, Object.Left, Object.Right, Object.Move, Object.Rotation (and Object.States("name").Rotation)
With these positioning properties, you can explicitly set or retrieve the
location of one side of the object.
If you want to reposition an object, the most efficient was to do it is via
'Move' To do this you specify x and y coordinates in pixels of where you want to
place the object.
You can also rotate an object using Object.Rotation.
Examples:
Object.Top = 500
Object.Move 500,200
For x = 1 To 10
Object.Rotation = x*36
Object.Sleep 200
Next
Reply #5 Thursday, June 26, 2008 2:17 PM

However the necessary code here:
X = cint((system.WorkareaRight - object.width)/2)
Y = cint((system.WorkareaBottom - object.height)/2)
object.move X,Y '<== this will move your object directly into the center of your screen
Best Regards.

Reply #6 Thursday, June 26, 2008 2:27 PM
I was so far off. (

Reply #8 Thursday, June 26, 2008 5:50 PM
You do this because you are undoubtedly a Soul of WC Community!


I like how you try to help each of us and may be assured that your posts are very useful every time.


Reply #10 Friday, June 27, 2008 10:10 AM
Hey Zu!! Cheers!!!



Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!
Reply #1 Thursday, June 26, 2008 11:46 AM