var
oldcursor:TCursor;  //光标
i:integer;         //变量i为子窗口个数
begin
   for i:=0 to MDIChildcount - 1 do
      begin
           if MDIChildren[i] is Tw_clientlr then
              begin
              MDIchildren[i].show;
              exit;
              end;  //if
      end; //for
oldcursor:=screen.Cursor;
screen.cursor:=crHourglass;
try
   w_clientlr:=Tw_clientlr.create(application);
finally
   screen.cursor:= oldcursor;
end; //finally
关闭可以用到如下:
自己体会一下!具体的就自己写吧!
procedure Tw_yyylr.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action:=caFree;
end;

解决方案 »

  1.   


    Action:=caFree;
    一定要要
      

  2.   

    直接在Form的OnClose里面就能够实现了
    不过不知道能不能够循环调用
    两个子窗口有自动创建该为手动创建
    然后在unit2里面
    implements
    {}
    uses unit3;
    procedure TForm2.FormClose(Sender:TObject);
    begin
       with TForm3.Create(Form3) do
        begin
          Show;
          refresh;
        end;
        Action:=cafree;
    end;
    你试一试
      

  3.   

    if self.activeclid<>nil then
        self.activeclid.close
      

  4.   

    虽然已经结帖但
    ACTION的属性我还是没有用上
    不知道到底有什么用!·
      

  5.   

    可以用
    而且我试过了,可以实现循环调用,也就是说,当Form2关闭的时候,Form3自动显示,Form3关闭的时候,Form2自动显示