DOCUMENT:Q140290 10-FEB-2000 [foxpro] TITLE :How to Add a Clock Display to a Form PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:3.0 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 3.0 ------------------------------------------------------------------------------- SUMMARY ======= In Visual FoxPro, there are two locations to place a clock display. The first is in the upper-right corner of the Visual FoxPro desktop. This is done by using the SET CLOCK ON command. The second is on the status bar at the bottom of the Visual FoxPro window. This is done by using the SET CLOCK STATUS ON command. This article shows by example how to place a clock display on a form by using a text box and a timer control. MORE INFORMATION ================ Steps to Place a Clock Display on a Form ---------------------------------------- 1. Create a new form. 2. Add a timer control to the form. 3. Add a text box to the form. 4. Set the following properties and events for the timer control: Name: clock Interval: 1000 Timer event: thisform.tdisplay.refresh 5. Set the following properties, events, and methods for the text box: Name: tdisplay Init event: THIS.value=time() Refresh method: THIS.value=time() 6. Run the form, and note that the clock is updated every second. Additional query words: VFoxWin ====================================================================== Keywords : Technology : kbVFPsearch kbAudDeveloper kbVFP300 Version : WINDOWS:3.0 ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.