VistaClock II - a gadget for your gui
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
VistaClock II - a gadget for your gui
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.
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.
Last edited by netmaestro on Sun Jun 24, 2007 4:08 pm, edited 7 times in total.
BERESHEIT
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 ?
much more interessant than a clock on the desktop.
what about a ResizeClock() function, to be usable and to fit in my apps ?
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Seems reasonable. I added the function, you can call ResizeClock(left,top,newsize) and it will change size. (or move) Here's a demo:
One more small change, the InitClock() function returns the handle of the clock window now, to give you control over it if needed.
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)
Last edited by netmaestro on Thu May 04, 2006 9:26 pm, edited 1 time in total.
BERESHEIT
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
also one more wish : can you provide the .lib if possible (for Import/EndImport ) ? 
( also if it could work on 16bit desktop :roll: )

( also if it could work on 16bit desktop :roll: )
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
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.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
repackaged as a zip:
http://www.networkmaestro.com/vistaclock128.zip
16-bit desktop support is coming.
http://www.networkmaestro.com/vistaclock128.zip
16-bit desktop support is coming.
Last edited by netmaestro on Wed May 10, 2006 1:19 pm, edited 1 time in total.
BERESHEIT
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).
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).