Page 1 of 4
VistaClock II - a gadget for your gui
Posted: Thu May 04, 2006 3:38 pm
by netmaestro
Drop a working analog clock onto your form with one command. You can download the library here:
http://www.networkmaestro.com/VistaCloc ... taller.exe (*new* Gadget version replaces dll version)
edit: I'll probably be adding some optional faces to it for different looks.
Posted: Thu May 04, 2006 4:21 pm
by Flype
that's really neat - netmaestro.
much more interessant than a clock on the desktop.
what about a ResizeClock() function, to be usable and to fit in my apps ?
Posted: Thu May 04, 2006 5:33 pm
by netmaestro
Seems reasonable. I added the function, you can call ResizeClock(left,top,newsize) and it will change size. (or move) Here's a demo:
Code: Select all
OpenWindow(0,0,0,640,480,"VistaClock dll Test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
CreateGadgetList(WindowID(0))
TrackBarGadget(0,200,400,240,20,64,320)
SetGadgetState(0,196) ; original clock size
OpenLibrary(0,"vistaclock.dll")
CallFunction(0,"InitClock",WindowID(0),RGB(224,223,227),320-GetGadgetState(0)/2,200-GetGadgetState(0)/2)
Repeat
EventID=WaitWindowEvent(20)
If EventID = #PB_Event_Gadget
CallFunction(0,"ResizeClock",320-GetGadgetState(0)/2,200-GetGadgetState(0)/2,GetGadgetState(0))
EndIf
CallFunction(0,"UpdateClock")
Until EventID=#PB_Event_CloseWindow
CloseWindow(0)
CloseLibrary(0)
One more small change, the InitClock() function returns the handle of the clock window now, to give you control over it if needed.
Posted: Thu May 04, 2006 8:36 pm
by Konne
Is the dll free, also in maybe money make programms?
Posted: Thu May 04, 2006 8:39 pm
by josku_x
Yea, I also wanted to ask if we can use it in commercial apps too.
It's very nice BTW.
Posted: Thu May 04, 2006 8:39 pm
by netmaestro
It's a gift. Use it any way you like!
- fixed a bug, please re-download, everyone. Should be final now.
Posted: Thu May 04, 2006 8:41 pm
by josku_x
netmaestro wrote:It's a gift. Use it any way you like!
- fixed a bug, please re-download, everyone. Should be final now.
Ok, thanks for the info..
(Grrrr! Try to post a reply the same time as I did and you can taste my fist

)
Posted: Thu May 04, 2006 10:08 pm
by Flype
also one more wish : can you provide the .lib if possible (for Import/EndImport ) ?
( also if it could work on 16bit desktop :roll: )
Posted: Thu May 04, 2006 11:37 pm
by mskuma
I must be doing something dumb.. in this demo I can't see anything.. I've checked the return value from the openlibrary function & it's non-zero so I guess it's loading ok but no clock.
Posted: Fri May 05, 2006 7:10 am
by Flype
when i downloaded the link above, my browser opera renamed the file as vistaclock.exe. i had to rename it... maybe this is your problem.
Posted: Fri May 05, 2006 7:26 am
by mskuma
Thanks Flype, but it was presented as a dll for saving.. but maybe it got corrupted somehow. @Netmaestro, would you mind packaging it into a rar or zip file? Thanks.
Posted: Fri May 05, 2006 7:38 pm
by srod
Very cool.
Thanks.
Posted: Sat May 06, 2006 10:50 am
by netmaestro
repackaged as a zip:
http://www.networkmaestro.com/vistaclock128.zip
16-bit desktop support is coming.
Posted: Sat May 06, 2006 2:25 pm
by GeoTrail
That is very cool. Nice work netmaestro

Posted: Sat May 06, 2006 5:39 pm
by Trond
I finally found a computer where this worked, and I must say that the look of it is absolutely gorgeous. (Can I say that about clock?)
Two small problems: When I click it my window loses focus and the clock background colour is not the same background colour as my window (I did nothing to change the window color).