Page 1 of 7

Transparent Clock

Posted: Sun Oct 29, 2006 9:06 pm
by netmaestro
What, another transparent clock? Hasn't it been done? Yes, it has. By me and others. But - I've never been particularly pleased with a few of the features of my earlier VistaClock, in particular:

- Won't run on 16-bit desktop
- Stops while being moved
- Second hand jumps rather than moving smoothly
- Filesize is 547k upx'd
- Uses 16mb system memory when running
- Many programming tricks employed to reduce cpu usage

I felt that this clock would make a good testbed for some of the new commands in my upcoming GdiPlus library, so I revisited the project with a view to testing out my lib. The result is:

- Will run fine on a 16-bit or 32-bit desktop
- Keeps running while being moved
- Second hand sweeps smoothly
- Filesize is 61k upx'd, one-ninth the size of VistaClock
- Uses 4.7 mb system memory
- No CPU conservation tricks are necessary - uses no cpu at all (here)

Wanna try it out?

http://www.networkmaestro.com/TransparentClock.exe

*new* Screensaver http://www.networkmaestro.com/TransparentClock.scr



For those using Windows 2000: TransparentClock.exe will now work in your OS, no need for a separate version.

Hope you like it! The lib is still in development, but when it's ready I believe almost any reasonably experienced PB programmer will be able to write something similar with little effort.

Posted: Sun Oct 29, 2006 9:30 pm
by thamarok
Can you give a not-upx'ed version? I am having problems installing UPX on my machine. Thanks!
EDIT: I want the not-upx version to make some tests like trying to run it in WINE, etc..

Posted: Sun Oct 29, 2006 9:33 pm
by netmaestro
No problem - done.

Posted: Sun Oct 29, 2006 9:33 pm
by PB
UPX is just an unpacker, it doesn't need to be installed to run the exe.

Posted: Sun Oct 29, 2006 9:36 pm
by thamarok
netmaestro wrote:No problem - done.
Where is the exe? Is it the same link?
UPX is just an unpacker, it doesn't need to be installed to run the exe.
Read my post carefully. This time using the glasses I bought you with the hasselhoff sticker in the lens :wink:

Posted: Sun Oct 29, 2006 9:39 pm
by netmaestro
Same link, same filename.

Posted: Sun Oct 29, 2006 9:42 pm
by Trond
Wow - only 50% usage.

Posted: Sun Oct 29, 2006 10:20 pm
by netmaestro
Sorry - one of my pngs was bad. Should be OK now.

Posted: Sun Oct 29, 2006 10:21 pm
by jack
looks very nice, but on my system it uses 19% CPU.

my system:
AMD Athlon XP 3200, Windows XP with latest updates.
[edit] that fixed the CPU usage, near 0% [/edit]

Posted: Sun Oct 29, 2006 10:23 pm
by netmaestro
Yes, it should be fixed. Could you redownload and try it again?

Posted: Sun Oct 29, 2006 10:30 pm
by mskuma
On my system, hovers around 2-3% usage. Nice!

Posted: Sun Oct 29, 2006 10:34 pm
by netmaestro
It actually is drawing everything on every pulsation, which is kind of unheard of when making something like this. I thought I could get away with it based on not using any DrawAlphaImage, but I guess I'll have to start drawing the base once a minute. Then it won't use any.

Posted: Sun Oct 29, 2006 10:35 pm
by netmaestro
Thanks jack!

Posted: Sun Oct 29, 2006 10:50 pm
by netmaestro
Switched the base png for a tiff, dropped the cpu usage on my wife's celeron 1.5 from 5% down to 0. So it should be zero everywhere now. Latest version is 113k not upx'd. Still drawing everything every pulse.

Please re-download for 0% CPU usage.

Posted: Sun Oct 29, 2006 11:33 pm
by rsts
0 % cpu here. Very impressive.

cheers

whoops - spoke too soon. holding just around 8% now. Still impressive.