Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

24 hr pop up clock?

Status
Not open for further replies.

Redsz

Programmer
Jul 30, 2002
158
CA
Does anybody know of a downloadable clock that i would be able to pop up from the gotfocus of a textbox . Get the the user to make a selection and return that value to the text box?

Thx
 
I've been looking for one of these for a long time... I never found one (Tried to code my own by using the "Control" class... never worked very well).

I've settled on using the Date Time Picker. It's not pretty, doesn't look like a clock, but it works... then we add (in KeyPress) sensing of +/- keys to inc/dec the hour, min, sec, etc.
 
When you say clock, are you refering to the &quot;analog&quot; variety? (Numbers 1 thru 12; hour, minute, and second hands <g>) or are you needing to enter time?

You can use the DateTime picker from Microsoft.

If you find using it a bit troublesome, try the KB article written as an example &quot;Visual FoxPro 6.0 Sample: Demonstrates How To Use the DateTimePicker Control&quot;, the id is 259646. This URL may go directly to it
Hope it helps.

James Jernigan
Nashville, TN USA
 
It's my guess that by &quot;clock&quot; Redsz does mean the analog variety... because that's what I mean. I think dragging the hands on a clock would be the fastest way to set time with a mouse... using date Time picker just gives you a spinner for hr min or sec, (If I remember correctly), and it's a pain to use with the mouse... but picking a date with it is a breeze!
 
In &quot;clock&quot; i meant the non analog variety :)

Howver thx for the suggestions guys as my manager told one of our clients that doing this would be a breeze.....yeah..thx bos......
 
As a quick way to do it...

Just &quot;parse&quot; your time into THISFORM.Hours, THISFORM.minutes and THISFORM.seconds, then put three spinners on the form.

(You could put it all together into a Container or Control class, if you'll be using this all over the place)
 
To go back and forth between DateTime() type and Hrs, Mins, Secs, use: HOURS() MINUTE() SEC() and DATETIME( nyr,nmon,day,nhrs,nmin,nsec)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top