Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

Interval

The Timer control’s Interval property determines the length of time between Timer events firing.

Usage

nInterval = tmrTimer.Interval
tmrTimer.Interval = nInterval

The Interval property specifies how much time (in milliseconds) elapses between each firing of the Timer’s Timer Event. Timers are turned off by setting the Enabled property .F. or by setting the Interval to zero. In earlier versions, we found that zeroing out the Interval and restoring its value can be more efficient than the time-consuming toggling of Enabled when the interval is very small. You’ll need to test the two alternatives in your environment to see which works best for you.

Example

frmForm.Timer1.Interval = 1500  && One and a half seconds
? frmForm.Timer1.Interval

See Also

Timer, Timer Event, Reset Method