on shutdown quit && at the top..vfp quit normally or anormally in all cases . .code.... . . . read events &&Visual FoxPro starts event processing.in case your main prg calls a form, in the form.destroy events put
clea events && vfp stops event processing