Código
procedure TForm1.Fechar_Janelas;
var
i : Integer;
begin
for i := 0 to Form1.ComponentCount - 1 do begin
if Form1.Components[i].InheritsFrom(TForm) then
begin
(Form1.Components[i] as TForm).Close;
end;
end;
end;
crie a procedure no form principal e é só chamar o evento antes da abertura do form
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009