Microsoft KB Archive/140290

= How to Add a Clock Display to a Form =

Article ID: 140290

Article Last Modified on 2/10/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q140290



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.



Steps to Place a Clock Display on a Form
 Create a new form. Add a timer control to the form. Add a text box to the form.  Set the following properties and events for the timer control:   Name: clock Interval: 1000 Timer event: thisform.tdisplay.refresh   Set the following properties, events, and methods for the text box:   Name: tdisplay Init event: THIS.value=time Refresh method: THIS.value=time  Run the form, and note that the clock is updated every second.</li></ol>

Additional query words: VFoxWin

Keywords: KB140290

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.