PROCEDURE Release(Force) oModalForm = This.GetModalForm() IF NOT ISNULL(m.oModalForm) && If there is a Modal form up, Close it. oModalForm.Close() && Make sure each modal form has Close() This.ShutDownApp = .T. && that can kill the form and not spawn another wait state. ENDIF Force = This.ReleaseType = 1 OR m.Force IF This.CallStackReleased OR VARTYPE(ThisApp) <> "O" && OR This.ReleaseType = 1 IF m.FromQueryUnload RetVal = .T. && This release method was called from the QueryUnload. ELSE && Program has just called the THISFORM.Release(). RetVal = THIS.QueryUnload(m.Force, .T.) && See if it's OK to leave. ENDIF * Release in reverse order, so the error handler is last. IF m.RetVal IF NOT ISNULL(This.oRules) This.oRules.Release() ENDIF FOR x = THIS.ControlCount TO 1 STEP -1 This.RemoveObject(THIS.Controls[m.x].Name) ENDFOR ON SHUTDOWN RELEASE ThisApp ELSE This.CallStackReleased = .F. This.ShutDownApp = .F. NODEFAULT ENDIF ELSE NODEFAULT && Don't Clear the App now. Set a && timer and allow its Event to call && the Release again. IF NOT VARTYPE(This.AppReleaseTimer) = "O" This.NewObject("AppReleaseTimer", "GenericTimer", "Handler.VCX") ENDIF This.AppReleaseTimer.Do("ThisApp", ; "Release("+ TRANSFORM(m.Force) + ", " ; + TRANSFORM(m.FromQueryUnload) + ", " ; + TRANSFORM(m.FromOnShutDown) + ", " ; + ".T.)", 100) This.CallStackReleased = .T. ENDIF RETURN m.RetValThe application object is in fact a form, and the Generic Timer class simply does a specified command after a certain amount of time has passed.