_screen.addobject("MyTimer","MyTimer") IF VARTYPE(pcCaption) = "C" _screen.MyTimer.ScreenCaption = pcCaption ENDIF _screen.MyTimer.Enabled = .T. DEFINE CLASS MyTimer AS Timer Interval = 1000 screencaption = "" PROCEDURE Init LOCAL lcTime, ltTime ltTime = DATETIME() lcTime = CDOW(ltTime) + " " + CMONTH(ltTime) + " " + ; ALLTRIM(TRANSFORM(DAY(ltTime))) + ", " + ; TRANSFORM(YEAR(ltTime)) + " " + ; TIME() IF EMPTY(This.ScreenCaption) _screen.Caption = lcTime ELSE _screen.caption = This.screencaption + " - " + lcTime ENDIF ENDPROC PROCEDURE Timer LOCAL lcTime, ltTime ltTime = DATETIME() lcTime = CDOW(ltTime) + " " + CMONTH(ltTime) + " " + ; ALLTRIM(TRANSFORM(DAY(ltTime))) + ", " + ; TRANSFORM(YEAR(ltTime)) + " " + ; TIME() IF EMPTY(This.ScreenCaption) _screen.Caption = lcTime ELSE _screen.caption = This.screencaption + " - " + lcTime ENDIF ENDPROC ENDDEFINE