Hi, papy33
As a Swiss Delph-beginner I hope I understood your question.
But please mind OnClose-Events and its close action:
<<
procedure TfFormX.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;//caHide
end;
>>
// Here you just find and close each Screen's Form which is
the same as to close all Application's Forms.
(You seam to know how to manage the timer "TimerCloseForms"
//****
procedure TfMain.TimerCloseFormsTimer(Sender: TObject);
var idx: Integer;
begin
(Sender as TTimer).Enabled := False;//disable Timer-Event
for idx := 0 to Screen.FormCount - 1 do begin
if Screen.Forms[idx] <> Self then begin //Self = fMain
with Screen.Forms[idx] do begin
Close;
end;//with
end;//if not Self
end;//for all Forms
end;
//***
I hope this code section encludes your problem's solution
greetings from |+|
Stefan