Is this possible to do in DesktopX?

Thursday, April 22, 2010 by DArnaez | Discussion: Object Desktop blogs

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!

Frogboy
Reply #1 Thursday, April 22, 2010 4:52 PM

It is possible to do that.

 

DArnaez
Reply #2 Monday, April 26, 2010 1:57 AM

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!!!

Littleboy
Reply #3 Monday, April 26, 2010 6:59 AM

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.

 

 

DArnaez
Reply #4 Monday, April 26, 2010 7:47 PM

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!!!

DArnaez
Reply #5 Tuesday, April 27, 2010 1:09 AM

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.

 

Littleboy
Reply #6 Tuesday, April 27, 2010 2:18 PM

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!

DArnaez
Reply #7 Thursday, April 29, 2010 5:22 PM

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

lanceloare
Reply #8 Friday, October 15, 2010 8:46 AM

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

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!



web-wc01