procedure TForm1.Button1Click(Sender: TObject); var i,j:integer; begin i:=screen.FormCount; for j:=0 to i-1 do begin if screen.Forms[j].Name<>application.MainForm.Name then begin if screen.Forms[j].Visible=true then screen.Forms[j].Close; end; end; end;
var
i,j:integer;
begin
i:=screen.FormCount;
for j:=0 to i-1 do
begin
if screen.Forms[j].Name<>application.MainForm.Name then
begin
if screen.Forms[j].Visible=true then
screen.Forms[j].Close;
end;
end;
end;