Execute PSTimer tick a limited number of times

ezequiel

Member
Hello, I have a window with a pstimer.ocx. It works Ok, but continuosly.

I need to set somewhere on the tick event, for it executes only 5 times and stpo, is that possible?
 

moveIT

New Member
DEFINE VARIABLE giCount AS INTEGER NO-UNDO INIT 0.

PROCEDURE CtrlFrame.PSTimer.Tick .
/*------------------------------------------------------------------------------
Purpose: Löst das Event "PSTimerTick" aus, wenn der Timer abgelaufen ist.
Parameters: None required for OCX.
------------------------------------------------------------------------------*/

giCount = giCount + 1.

IF giCount <= 5 THEN DO:
/* your BL */
END.

END PROCEDURE. /* CtrlFrame.PSTimer.Tick */
 
Top