clock - time display

Lanason

Registered User.
Local time
Today, 14:09
Joined
Sep 12, 2003
Messages
258
How do I display the CURRENT time on a form - ie keeps updating without refreshing the form ??
 
Put a caption on your form. Call it lblCurrentTime.

Open the Form's properties. Set the Form's TimerInterval to 1000.
In the OnTimer event put this code:

Code:
Me.lblCurrentTime = Now()


This, however, is pointless as you typically have a clock on your computer in the bottom right corner anyway.

It'll also slow down your system.
 
caption ??

whats a Caption ? is it a text box or button.

Speed is not an issue and I want to display date and time in a particular part of the screen.

The time on my task bar hides on my pc and needs a mouse move to activate ....
 
Re: caption ??

Lanason said:
whats a Caption ? is it a text box or button.

A label. I think you may have to put this in the OnTimer event
Code:
    Me!lblCurrentTime .Caption = Format(Now, "hh:mm:ss")

IMO
 

Users who are viewing this thread

Back
Top Bottom