Te muestro el código que utilizo para mostrar los informes de manera no modal y cerrarlos desde una ventana que no es la propia.
El inconveninete que tiene es que de esta manera no se puede acceder a ningun valor ni funcion de la ventana (solo mostrar y cerrar)
Código:
type
TInformes = class(TForm)
...
public
class procedure Mostrar(ATag: integer);
class procedure Tancar;
end;
Var
VTag:integer;
class procedure TInformes.Mostrar(ATag:integer);
Var
I:integer;
F:Tform;
begin
For I:=Screen.FormCount-1 downto 0 do
begin
F:=Screen.Forms[i];
if (F is Self) and(Atag<>0) then
begin
if (F.Tag=Atag) or (F.Tag+1000=Atag) then
begin
f.show;
F.BringToFront;
exit;
end;
end;
end;
VTag:=ATag;
F:=Create(Application);
F.FormStyle:=fsMDIChild;
F.WindowState:=wsMaximized;
F.BringToFront;
end;
class procedure TInformes.Tancar;
Var
I:integer;
F:Tform;
begin
For I:=Screen.FormCount-1 downto 0 do
begin
F:=Screen.Forms[i];
if (F is Self) then F.Close; //and tag=num
end;
end;