Hi guys! I came to ask the proffessionals in DesktopX if this idea is possible.  The plan is to give each object in the scene a property to change it size depending the position in the screen. If somebody know please let me know how. THanks in advance!


Comments
on Apr 22, 2010

It is possible to do that.

 

on Apr 26, 2010

Hey Frogboy!!! don't let me with the mystery!!! Do you know any tutorial or any clue to help me discover how to do this? Thanks!!!

on Apr 26, 2010

Hi D. Arnaez!

You can find the scripting reference on Stardock website. The function and properties you are interested in are:

  • Object.Top
  • Object.Left
  • Object.Width
  • Object.Height
  • Object_OnMove(x, y)

I've made a very small example object to get you started.

 

 

on Apr 26, 2010

Beautiful!!!!!!  That is very close to the idea!!!... now how can I set the 0 x and 0 y in the center of the screen for all monitors?

Thanks a lot!!!

on Apr 27, 2010

Ok I think that I got it!!!  Just modify the script in

Object.Width = 40 + 100 * (y / System.screeWidth)  instead (x / System.screeWidth)

 

Now only change it size only when go up or down. That is perfect.

Now have a question. Due to the first statement

Sub Object_OnScriptEnter

     'Reset position

Object.Top=100

Object.Left=100

 

When the user move the object to any new position, the object change its size, great.... but when the user restart Windows... the object back to the original position.

How can I keep the last position used?

 

Thanks again.

 

on Apr 27, 2010

Keeping the last used position is relatively easy, you just need to comment the 4 lines at the top (for resetting size & position) and when exporting your object as a gadget, use "Simple Deployment" and check the "Persist object status across reloads" checkbox.

For slightly more involved gadgets, you might need to store object properties by hand (if you have custom properties other than the DX-provided ones on your objects). You can use a custom configuration file or Object.Local/PersistStorage depending on your needs.

Hope this helped!

on Apr 29, 2010

I tried your solutions but I'm doing something wrong. The objects must be exported as DesktopX object because nobody want to open .exe files... even me when I tried the Kaspersky bring a lot of warnings. Here I attach an sample of the object that works but doesn't keep the latest position.

Object Test

on Oct 15, 2010

DesktopX Builder in its three variants (standard, pro, enterprise), let you build widgets, gadgets and desktop from DesktopX objects.

An object is the most elementary block over which complex functionality is built. Objects can be background images, text, buttons or ActiveX containers.

 

 

____________________________
http://www.flvplayerdownload.org