Transparent Clock

Developed or developing a new product in PureBasic? Tell the world about it.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Looks great.

Since you love to tinker with it (who wouldn't it's a masterpiece), how about an option for the city (and to set) the 0 offset time.

That way I can have multiple clocks set for different time zones and easily pick mine out.

It is fantastic, but watch out for dobro :lol:

cheers

whoops - at 55% cpu, maybe you don't need to watch out afterall. :)
Last edited by rsts on Tue Oct 31, 2006 4:16 pm, edited 1 time in total.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

I must say wow again. I dowloaded the latest version and it now stays steady between 0 and 1% CPU (mostly 0) if the background under it doesn't change.

One bug though: When the about window is open you can't move it.
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 »

Well, if Trond's impressed it's finished. You just can't get any better than that :D

Just kidding, that's a good idea rsts, I'll implement it.
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 »

Couple changes made:

- There's a 'No Change' option on the Timezone menu to allow for your own city to be displayed

- The clock will move while the About or Resize windows are open (thx trond)
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 »

One more update, nothing huge:

- Secondhand now changes dropshadow on the vertical, same as the other hands

- In the course of implementing this, I changed the method of switching the dropshadow on the hand images from my old way, which was loading two images, to a better way: loading one image and cloning/flipping it in memory. Result is the exe is lighter by almost 10k.

I LOVE GDI+ ! It makes everything so easy.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Thanks! The resizing works perfectly.

Now i just have another thing; what about "stick to desktop? Trond had it in his clock!

His clock was opensource and here is the sticktodesktop source:
Procedure StickToDesktop()
StickyWindow(0, 0)
SetParent_(WindowID(0), GetShellWindow_())
UncheckMenu()
SetMenuItemState(0, 0, 1)
EndProcedure
(I would like a "STAY" feature too, so i could stick to desktop (wich preserves that even a wrong click would get it up above the other windows) and not move when i drag it. So its a permanent, non-moveable clock :) well.. just if you got extra time on your hands!)

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

OK, that stuff is done. When the locked feature is enabled, the clock is defending itself against WM_MOVING in a callback, so there should be no way at all to move it.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

:shock:

Great :)
SoulReaper
Enthusiast
Enthusiast
Posts: 372
Joined: Sun Apr 03, 2005 2:14 am
Location: England

Post by SoulReaper »

The Clock is Really Great Netmaestro :)

you are indeed a programming guru :)
Never seen a Frog/Toad Smile before and with teeth :lol: :wink:
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

Great clock, I'm impressed.

One question: if I lock it to the desktop and set it not be movable anymore, are these setting persistent? Will it autorun on the next reboot using the same settings?
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
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 »

Thanks, I appreciate it. Unfortunately, there's no persistence built-in. I can add it if there's a demand.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

netmaestro wrote:I can add it if there's a demand.
There is :)
Be sure to store the position too!

thx.
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 »

I'll see what I can do, I have to plan it out as several users are going to be running multiple instances set to different timezones.
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

netmaestro wrote:I'll see what I can do, I have to plan it out as several users are going to be running multiple instances set to different timezones.
that is exactly what I had in mind....
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

Suggestion:

Why not just have the program create a cfg file from the settings that a
person enters. Then all you need to do is to add it to your start menu
and it will start up with windows and be set up as you want. Changing
any perameters could also edit the cfg file for next time.

Or,

You could also have a menu item to save the cfg file and give it a name.
Then you could have yor program accept a command line name.cfg,
or default to local time without a command line name.cfg. That way you
could set up several clocks if you want.
Example: Placed in your start menu.
TransparentClock.exe London.cfg
TransparentClock.exe Honolulu.cfg
TransparentClock.exe Tokyo.cfg
TransparentClock.exe
Placed in your start menu would start all four clocks with your entered settings.
London, Honolulu, Tokyo, and a Local clock
Post Reply