Article ID: 127942
Article Last Modified on 2/12/2000
* To remove the object:
ON KEY LABEL F6 _SCREEN.RemoveObject('oTime')
* To activate the Timer:
_SCREEN.AddObject('oTime','MyTimer')
* Class definition. The TIMER event is triggered every second, and a
* WAIT WINDOW is displayed.
DEFINE CLASS MyTimer AS Timer
Interval= 1000
PROCEDURE Timer
WAIT WINDOW (TIME()) NOWAIT
ENDPROC
ENDDEFINE
PUBLIC oTimerObj
* The instance variable is released when F6 is pressed.
ON KEY LABEL f6 RELEASE oTimerObj
oTimerObj=CREATEOBJECT('MyTimer')
DEFINE CLASS MyTimer as Container
ADD OBJECT oTimerobj as TimerClock
ENDDEFINE
DEFINE CLASS TimerClock as Timer
Interval = 1000
PROCEDURE Timer
WAIT WINDOW (TIME()) NOWAIT
ENDPROC
ENDDEFINE
Additional query words: VFoxWin
Keywords: kbcode KB127942