Page 4 of 4

Posted: Mon May 15, 2006 12:33 am
by netmaestro
Added a non-transparent option and removed the last bit of cpu usage. It sits at 0 now. (here) This thing is done for sure now as I don't plan on updating it further.

Posted: Mon May 15, 2006 12:55 am
by Joakim Christiansen
netmaestro wrote:Added a non-transparent option and removed the last bit of cpu usage. It sits at 0 now. (here) This thing is done for sure now as I don't plan on updating it further.
Really nice, now give us the source code! :lol: (j/k)
It don't use any CPU here either but it use 15mb of memory! :shock: (But I don't care)

Posted: Mon May 15, 2006 3:12 pm
by techjunkie
netmaestro wrote:A new version is ready, with some more features. Drop shadowing is rendered correctly, you can choose from several sizes from tiny to jumbo, there is a system tray icon for control, you can hide/show the clock, and cpu usage is down to nil as redrawing is arranged to take place only when a hand needs to move. Even at the jumbo size setting, cpu usage is 0. Get it while it's hot!
Really nice clock! :D

But where are the extra features?!? Size and hide? The version I download from http://www.networkmaestro.com/VistaClock.exe don't have these features. :cry:

Posted: Mon May 15, 2006 8:36 pm
by netmaestro
I added the hide feature. I don't think I'm ever going to make it sizeable as it uses exclusively DrawAlphaImage() and the only way you can resize an Alpha image is to use the Raw flag. The result is "less than production quality" without any smoothing, so I'm at a bit of a loss for now unless I can find an API or resize algorithm that both smooths and preserves the alpha layer information. If I find something I'll update it, another thing I've considered is releasing 3 exe's, one at 90px, one at 128 (current) and one at 196, all of which I've created graphics for. But putting them all into one exe and offering 3 size options would mean the thing would be about 1.2 mb after upx'ing. That's kinda big but if plenty of people are interested in an exe that size with those size options, I can easily do it.

Posted: Tue May 16, 2006 7:56 pm
by netmaestro
Added a brushed aluminum face. I'm going to add it to the VistaClockGadget() too.

Image

Posted: Fri May 19, 2006 6:58 am
by Intrigued
This version is working excellent on my Win XP Pro system.

Nice job!

Posted: Fri May 19, 2006 3:30 pm
by Barney
Please, please, please, can we have a peek at the source code of this beauty...

Barney

Posted: Fri May 19, 2006 4:24 pm
by Trond
Barney wrote:Please, please, please, can we have a peek at the source code of this beauty...

Barney

Code: Select all

UseTIFFImageDecoder() 

OpenWindow(0, 0, 0, 512, 384, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu) 
SetWindowLong_(WindowID(0), #GWL_EXSTYLE, GetWindowLong_(WindowID(0), #GWL_EXSTYLE) | #WS_EX_LAYERED) 

LoadImage(0, "clock.tiff") 

hDC = StartDrawing(ImageOutput(0)) 
  GetObject_(ImageID(0), SizeOf(BITMAP), @BitmapInfo.BITMAP) 
  ContextOffset.POINT 
  BlendMode.BLENDFUNCTION 
  BlendMode\SourceConstantAlpha = 255 
  BlendMode\AlphaFormat = 1 
  UpdateLayeredWindow_(WindowID(0), 0, 0, @BitmapInfo+4, hDC, @ContextOffset, 0, @BlendMode, 2) 
StopDrawing() 

Repeat 
  Select WaitWindowEvent() 
    Case #PB_Event_CloseWindow 
      Break 
  EndSelect 
ForEver
Now you just create a few more windows which are child windows of this one using the same technique, three for the pointers and one for the glass reflection.

Posted: Fri May 19, 2006 4:27 pm
by netmaestro
I'm sorry, I don't see a clock there. If you want to achieve a working clock you have to buckle down and actually program something, assuming one is able.

Posted: Fri May 19, 2006 5:07 pm
by Berikco
Very nice 8)

Posted: Sat May 20, 2006 6:21 pm
by Inf0Byt3
@netmaestro, just a little question... How did you make the pointers move? You literally draw them on the background?

Posted: Sat May 20, 2006 6:52 pm
by netmaestro
Good question, I'll have to ask trond how I did that and get back to you.

Posted: Sat May 20, 2006 7:07 pm
by Inf0Byt3
:lol: It was right under my eyes! I think I must start wearing glasses :D.