First of all, is there a way to place a digital clock with the current time on a form? Does it require some type of activex control? If so, is there one out there that is free?
Don't know it it makes any differance but I use VFP6.0
No, you don't need an ActiveX control. You can do it easily, in any version of VFP.
Just place a label on the format. Format it to make a look like a clockface (for example, big yellow characters on a black background).
Add a timer to the form. Set its interval to, say, 10 seconds. In the Timer event, set the caption of the label to the value returned by LEFT(TIME(),5).
That will give you the time to the nearest minue If you want it to update every second, set the caption to TIME(), and set the timer's interval to, say, 100 ms.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Old-fashioned SET CLOCK ON is good (even though tiny by default) - but it wouldn't place the clock on a form. It would place onto an upper right corner of the main VFP window, or onto a specified position of the main VFP window if you use SET CLOCK TO nRow, nCol. Which may actually be on a form - if you happen to have an unmovable, fixed size form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.