PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: form1 (c:\sviluppo\prove\schede\test timer lock.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 10/22/03 12:22:00 PM * #INCLUDE "c:\sviluppo\g1\include\all.h" * DEFINE CLASS form1 AS form DataSession = 2 DoCreate = .T. Caption = "Form1" Name = "FORM1" ADD OBJECT timer1 AS timer WITH ; Top = 11, ; Left = 21, ; Height = 23, ; Width = 23, ; Enabled = .F., ; Interval = 10, ; Name = "Timer1" ADD OBJECT command1 AS commandbutton WITH ; Top = 10, ; Left = 66, ; Height = 27, ; Width = 84, ; Caption = "TRY", ; Name = "Command1" PROCEDURE giro RETURN 45 ENDPROC PROCEDURE Load CREATE CURSOR t1 (f1 I) FOR k=1 TO 500000 INSERT INTO t1 VALUES (1) NEXT ENDPROC PROCEDURE timer1.Timer this.reset ? "timer",SECONDS(),this.enabled ENDPROC PROCEDURE command1.Click thisform.Cls thisform.timer1.reset thisform.timer1.enabled = .T. ? "start update" UPDATE t1 SET f1=f1+thisform.giro() ? "end update" thisform.timer1.enabled = .F. thisform.timer1.reset REPLACE ALL f1 WITH f1+thisform.giro() IN t1 ? "end REPLACE" * NOW burst of timer events is fired !!! ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************I run this on: