lparameters tlForceShutDown local lcOnShutdown, llQuit _screen.mousepointer = MOUSE_HOURGLASS *----------------------------------- *--- Close all applications forms *----------------------------------- with this if wexist('Report Designer') *set sysmenu to default && Restore standard menu release windows 'Report Designer' && try to close report preview window endif if vartype(.oForms) = 'O' and not .oForms.CloseAllForms(m.tlForceShutDown) return .f. endif if vartype(.oUserLogMgr) == 'O' *----------------------------------------------------------------- *-- Close the entry in the user log *----------------------------------------------------------------- .LogUserActivity("Logout") .oUserLogMgr.release() endif if vartype(.oRecordMgr) == 'O' *----------------------------------------------------------------- *-- Unlock any records the user may have open. *----------------------------------------------------------------- .oRecordMgr.UnlockAll(.cUserid) .oRecordMgr.release() endif *----------------------------------------------------------------- *-- Release the timer and run the parent code. *----------------------------------------------------------------- .ReleaseDesktopTimer() .ReleaseAbstractFactory() .ReleaseDBCMgr() *---------------------- *-- Restore the caption *---------------------- _screen.caption = .cOldMainWindCaption set message to "" *------------------------------------- *-- Restore the setting of ON SHUTDOWN *------------------------------------- lcOnShutdown = .cOldOnShutdown on shutdown &lcOnShutdown .ReleaseSplash() .ReleaseToolbar() .ReleaseMenu() .ShowVFPToolbars() .ReleaseDesktopImage() .ReleaseChildren() .ReleaseGlobalEnvironmentObj() *--- If the Connection Manager exists, release it if vartype(.oConnectionMgr) == "O" .oConnectionMgr.release() endif .oErrorMgr = .null. *-------------------------------------------------- *-- Indicates that the Cleanup method has already *-- been run. *-------------------------------------------------- .lIsClean = .t. _screen.mousepointer = MOUSE_DEFAULT close data all clear events clear program endwith if m.llQuit quit endifAll the forms are closed, preview window is closed, so I thought everything is working...