Transparent clock with source

Developed or developing a new product in PureBasic? Tell the world about it.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Dano wrote:Very nice clock. I want it permanently on my dektop. The only thing I would change is to have the hour hand update a quarter of the way to the next hour every 15 minutes. At 9:59 it looks still like 9:00 until it hits 10:00.

Dan
Well, that was a design decision on my part. I could probably change it.
Dano
User
User
Posts: 41
Joined: Fri Jul 16, 2004 4:20 am
Location: Edmonton, Ab, Canada

Post by Dano »

Trond: Yes Please, if you could change that to look like a regular clock so I'm not guessing if it is one hour or the next that would be great.

Psychophanta: Yes I see yours does what I want. However when I click on UTC update it freezes the display. Might be because of our company firewall.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

About the UTC problem, that's probably due to the used port, there is used with port number 13.
If so there could be done a function to see what are the ports available and then use the appropiate one.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Dano
User
User
Posts: 41
Joined: Fri Jul 16, 2004 4:20 am
Location: Edmonton, Ab, Canada

Post by Dano »

I was trying to change the clock hands to all black like the second hand so I can go really translucent and still see the hands. I brought the tiffs into a paint program and made them black but it is not doing what I think it should be doing. Can you guys enlighten me as to what is going on here?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Well, what is it doing? You need a paint program with support for alpha transparency.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

The CPU usage has now been drastically reduced (only 2-3% here) and the hour hand updates every minute.
Dano
User
User
Posts: 41
Joined: Fri Jul 16, 2004 4:20 am
Location: Edmonton, Ab, Canada

Post by Dano »

That's better. Gimp works great and has alpha channel support. Now I have my black hands.


Trond nice job. Your latest version is much better.
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Hi Trond, thanks for sharing this.
Dare2 cut down to size
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Looks like SetWorldTransform_() does not work or something in PB4.40b2 :roll:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Post by c4s »

Psychophanta wrote:Looks like SetWorldTransform_() does not work or something in PB4.40b2 :roll:
Take a look at the PureBasic-Blog:
purebasic.fr/blog/?p=196 wrote:You can still mix API drawing functions with PB functions on the same output without problems. The only thing that changed here is that GDI functions that change the global state of the device context no longer affect the PB drawing functions like they used to because the PB functions do not actually used that device context. So a function like SetWorldTransform() will not cause DrawImage() to draw a rotated image anymore. However it should still work if you use the BitBlt() API.
;)
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Thanks for helping, c4s.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
ruland
New User
New User
Posts: 3
Joined: Sun Sep 04, 2011 7:23 am

Re: Transparent clock with source

Post by ruland »

I know this thread is old, but could someone post a working link to the source code, please?
User avatar
HAnil
User
User
Posts: 87
Joined: Thu Feb 26, 2004 5:42 pm
Location: 28:58E 41:01N

Re: Transparent clock with source

Post by HAnil »

Hi Trond,
is it possible to give new link for download ?
Thanks,
PureBasic v5.22 LTS & Mac & Windows8
Post Reply