Promotic
WikipediaLinkedInYoutubeTwitterFacebook

StartEx - method of object PmTimer

Description:
Timer activation with the specified number of runs and the period
Syntax:
StartEx(fPeriod As Single, nCounter As Long)
Calling:
oTimer.StartEx fPeriod, nCounter
Parameters:
fPeriod(Single) New timer period in seconds or instruction to use current timer period.
fPeriod > 0 - Value greater than 0 means the new value of timer period in seconds. The value of the parameter is moved to the Period property.
fPeriod = -1 - Timer period is not to be changed. The Period property is not changed.
nCounter(Long) Number of timer runs. The value of the parameter is moved to the Counter property.
nCounter > 0 - Value greater than 0 means the number of next timer runs. Each timer run automatically decreases the value of the counter by 1.
nCounter = 0 - The timer won't be started
nCounter = -1 - The number of timer runs is unlimited
Note:

Calling this method is identical as setting the Enabled to true, Period to the value of the fPeriod parameter and Counter to the value of the nCounter parameter.

After running the specified number of runs, the timer stops and Enabled is false, Period remains unchanged on the value of the fPeriod parameter and Counter is 0.

For more common time control it is better to use the PmSequencer object.

© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice