Try the VistaClock - Major performance update!

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Try the VistaClock - Major performance update!

Post by netmaestro »

This little companion will sit on your desktop and tell you the time tirelessly without disturbing your desktop (it's transparent!) and use no cpu time at all. Give it a try! A gift from your friend, netmaestro.

http://www.networkmaestro.com/VistaClock.exe
Last edited by netmaestro on Sun May 14, 2006 8:07 pm, edited 1 time in total.
BERESHEIT
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Wow! Very cool :)

(a little feature addition: be able to resize it :) or at least choose something like "50% size")
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post by Killswitch »

That's pretty cool - although the transparency is a little laggy. If I jam the clock in the middle of my screen, then slowly minimise the windows behind it then you can see that the background of the clock is the same as a part of the last window. Apart from that it's quite nice!
~I see one problem with your reasoning: the fact is thats not a chicken~
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Ack I found a bug. A couple people downloaded this before I noticed it, but the clock was wrecking your clipboard. It was a debugging check I had in there and forgot to remove. Sorry! :oops: It's fixed now, please re-download.

@thefool: Good point! I'll take a look at that.
BERESHEIT
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Cool clock.

Some nice coding.

cheers
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

netmaestro wrote: @thefool: Good point! I'll take a look at that.
great :)
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

I like it.
I guess the source is not very large.
Shoud be good to improve the dragging to be perfectly done :)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Very very nice... How did you make the semitransparent window, with #gwl_exstyle?
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post by utopiomania »

Very nice! Just one request, can you make it tick like my wristwatch? That would have been cool. :)
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Fixed another fairly serious bug where the clock lost transparency after about ten minutes of running.

Latest version has this and the clipboard bug fixed, it is branded "Beta 2" in the About box. Please download this version if you have an earlier one.
BERESHEIT
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

Hi Netmaestro! Thanks for this. I noticed a couple of things. I had a regular folder window open underneath where it initially appeared. This seemed to cause some crazy flashing (clock would quickly appear then disappear) for about 15 seconds. If I started the app with no open windows, there was no problem. Then if I drag the clock around, it seems to take a snapshot of the area under the clock (also freezing the tick which makes sense) until I release the mouse when the clock is at the new position. Maybe this is to be expected. When the mouse is released, there was a flash (seemed like background repaint, white square fill, then clock).
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

very nice! but the clock using up to 15% of my CPU... as far as i can see, you did it all with some Win32 API and PB commands without any OGL stuff or that! respect! cool!
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Beta 3 is the latest version, it's the best behaved so far. I'll be working on this again today, with the following features planned:

- able to resize
- drop shadows corrected for hands on the left side of the clock
- add alarms which will play sounds, show graphics, or run scripts on reaching the specified time
- performance improvements, if possible.

VistaClock is PureBasic v4.0 all the way, as it relies heavily on alpha layers rendering correctly. You could write something nice in 3.9x, but it wouldn't look the same. Long live the alpha! (snd) :wink:
BERESHEIT
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Displays absolutely nothing at all but uses 20% CPU on Windows 2000.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Ah, interesting. Thanks for the feedback, I suspect the issue there is that it uses a windowed screen and sprite3d graphics, which requires dx7 or better to be available. I'll put cleaner code in there so it ends gracefully if it can't run. (I'm guessing no dx7 is the issue, anyway) The reason for the cpu usage will be that it can't verify the background so it's always trying to update it. Good one, thanks again.
BERESHEIT
Post Reply