I got the shutdown procdure to work as a separate .prg, but the only thing that's strange is I get 2 messageboxes asking if I want to close the program,
here's the code I'm using:
*--shutdown procedure
IF TYPE("goApp")=="O" AND NOT ISNULL(goApp)
RETURN goApp.OnShutDown()
ENDIF
Cleanup()
IF !glDebug
QUIT
ELSE
goApp.RELEASE
ENDIF
FUNCTION Cleanup
IF CNTBAR("_msysmenu")=7
RETURN
ENDIF
ON ERROR
ON SHUTDOWN
SET CLASSLIB TO
SET PATH TO
RELEASE ALL
CLEAR ALL
CLOSE ALL
POP MENU _MSYSMENU
RETURN
ENDFUNC
Perry
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.