Try using an ON SHUTDOWN routine that clears events, and make sure you don't have dangling object references.
Bob
>If I kill MyProcess using Task Manager, no problem. But if I do a shutdown of my computer, I got a "Cannot Quit Visual Foxpro". How to avoid that?
>
>My process is the following...
>
>*** MyProcess.PRG
>_screen.Visible = .f.
>oService = NEWOBJECT("vfpsvr")
>IF _vfp.StartMode > 0
>...READ EVENTS
>ENDIF
>CLOSE ALL
>RELEASE ALL
>QUIT
>
>DEFINE CLASS vfpsvr as Form
>...PROCEDURE Init
>......this.AddObject("mytimer","mytimer")
>......WITH this.mytimer
>..........enabled = .t.
>..........interval = 900000
>......ENDWITH
>...ENDPROC
>...PROCEDURE Destroy
>......CLEAR EVENTS
>...ENDPROC
>ENDDEFINE
>
>DEFINE CLASS mytimer as Timer
>...PROCEDURE timer
>......IF BETWEEN(DOW(DATE()),2,6) AND BETWEEN(VAL(LEFT(TIME(),2)),6,17)
>.........this.Enabled=.f.
>.........DO MyProcess
>.........this.Enabled=.t.
>......ENDIF
>...ENDPROC
>ENDDEFINE
>
>PROCEDURE MyProcess
>...
>...
>ENDPROC
'If the people lead, the leaders will follow'
'War does not determine who is RIGHT, just who is LEFT'