Timer.Mode

From Xojo Documentation

Property (As Integer )
aTimer.Mode = newIntegerValue
or
IntegerValue = aTimer.Mode

Supported on Desktop, Web, Console.

The interval at which the Action event will be executed. The default is Multiple for Timers added as a control. The default is Off for Timers created in code.

Notes

The following class constants are available:

Class Constants Description
ModeOff The timer is off (the default when created in code).
ModeSingle The timer will fire once.
ModeMultiple The timer will fire repeatedly (the default when added as a control).

Setting Mode will restart the Timer, the same as calling Timer.Reset, even if the value hasn't changed.

Sample Code

Set the mode to Single:

Timer1.Mode = Timer.ModeSingle