DEFINE CLASS myTimer as Timer OLEPUBLIC FUNCTION INIT this.enabled = .t. this.interval = 2000 ENDFUNCTION FUNCTION TIMER ... ENFUNCTION FUNCTION Quit() this.enabled = .f. CLOSE TABLES RELEASE ALL EXTENDED QUIT ENDFUNCTION ENDDEFINEthen from c# in the stop method
if (this.objMyTimer != null) { this.objMyTimer.Quit(); this.objMyTimer = null; }