DEFINE CLASS form1 AS form Top = 0 Left = 0 DoCreate = .T. Caption = "Form1" counter = 0 Name = "Form1" ADD OBJECT timer1 AS timer WITH ; Top = 24, ; Left = 36, ; Height = 37, ; Width = 61, ; Name = "Timer1" ADD OBJECT command1 AS commandbutton WITH ; Top = 36, ; Left = 204, ; Height = 37, ; Width = 73, ; Caption = "Command1", ; Name = "Command1" PROCEDURE timer1.Timer THIS.ENABLED = .F. THISFORM.counter = THISFORM.counter+1 THIS.ENABLED = .T. ENDPROC PROCEDURE command1.Click APPLICATION.AUTOYIELD = .T. * Dangle around doing something for 15 seconds with the timer firing 4 times/sec THISFORM.timer1.INTERVAL = 250 THISFORM.timer1.ENABLED = .T. s = SECONDS() DO WHILE SECONDS() - s < 15 SELECT ID FROM cTable WHERE ID = 1 INTO CURSOR viv * DOEVENTS ENDDO * Stop the Timer: THISFORM.timer1.Interval = 0 * Enter WAIT state: DO WHILE MESSAGEBOX(THISFORM.counter,1) <> 2 ENDDO ENDPROC ENDDEFINEWith Autoyield = .F. the Timer code never executes (either in the main loop or in the subseqent wait state) regardless of the inclusion of DOEVENTS - the interrupt is effectively discarded.