Page 1 of 1

TimeGadget

Posted: Wed Dec 12, 2007 12:43 pm
by PB
Could netmaestro's code (below) be made a native gadget?

Code: Select all

#DTS_TIMEFORMAT = $9
OpenWindow(0,0,0,320,240,"Somebody Just Shoot Me...",$CF0001)
InitCommonControls_() ; Not needed?
dtp = CreateWindowEx_(0,"SysDateTimePick32","",#WS_CHILD|#WS_VISIBLE|#DTS_TIMEFORMAT,100,100,100,22,WindowID(0),0,GetModuleHandle_(0),0)
Repeat : Until WaitWindowEvent()=#WM_CLOSE

Re: TimeGadget

Posted: Wed Dec 12, 2007 9:13 pm
by PB
Actually, as I woke up this morning I realised I could just do it like this:

Code: Select all

DateGadget(0,20,20,100,20,"",0,#DTS_TIMEFORMAT)
So I guess this request should really be to make the #DTS_TIMEFORMAT flag
an official PureBasic one, and cross-platform, such as #PB_Date_TimeFormat.

Posted: Sun Jul 12, 2009 5:38 am
by klaver
Such flag would be very useful, but is similar widget supported on Linux, MacOS, Amiga?