LPARAMETERS tlForceShutDown LOCAL lcOnShutdown _screen.MousePointer = MOUSE_HOURGLASS *----------------------------------- *--- Close all applications forms *----------------------------------- IF NOT This.oForms.CloseAllForms(tlForceShutDown) RETURN .F. ENDIF *----------------------------------------------------------------- *-- Close the entry in the user log *----------------------------------------------------------------- This.LogUserActivity("Logout") IF VARTYPE(This.oUserLogMgr) == 'O' AND ; NOT ISNULL(This.oUserLogMgr) This.oUserLogMgr.Release() ENDIF *----------------------------------------------------------------- *-- Unlock any records the user may have open. *----------------------------------------------------------------- This.oRecordMgr.UnlockAll(This.cUserid) IF VARTYPE(This.oRecordMgr) == 'O' AND ; NOT ISNULL(This.oRecordMgr) This.oRecordMgr.Release() ENDIF *----------------------------------------------------------------- *-- Release the timer and run the parent code. *----------------------------------------------------------------- This.ReleaseDesktopTimer() This.ReleaseAbstractFactory() This.ReleaseDBCMgr() *---------------------- *-- Restore the caption *---------------------- _screen.Caption = This.cOldMainWindCaption SET MESSAGE TO "" *------------------------------------- *-- Restore the setting of ON SHUTDOWN *------------------------------------- lcOnShutdown = This.cOldOnShutdown ON SHUTDOWN &lcOnShutDown This.ReleaseSplash() This.ReleaseToolbar() This.ShowVFPToolbars() This.oErrorMgr = .NULL. This.ReleaseMenu() This.ReleaseDesktopImage() This.ReleaseChildren() This.ReleaseGlobalEnvironmentObj() *--- If the Connection Manager exists, release it IF TYPE("this.oConnectionMgr") == "O" AND !ISNULL(this.oConnectionMgr) This.oConnectionMgr.Release() ENDIF IF WEXIST('Report Designer') RELEASE WINDOWS 'Report Designer' && try to close report preview window ENDIF CLOSE DATA ALL CLEAR EVENTS *-------------------------------------------------- *-- Indicates that the Cleanup method has already *-- been run. *-------------------------------------------------- This.lIsClean = .T. _SCREEN.MousePointer = MOUSE_DEFAULT CLEAR PROGRAM