Form2.Free;
activechildenform.free;

解决方案 »

  1.   

    用activechildenform.free;系统显示程序有错,不能执行
    .
      

  2.   

      for i:=0 to  application.MainForm.MDIChildCount-1 do
        begin
          application.MainForm.MDIChildren[i].Close;
        end;
      

  3.   

    在子窗体的OnClose事件中加入如下语句就可解决子窗体总是留在父窗体左下脚的问题
    action:=cafree;
      

  4.   

    在子窗体的OnClose事件中加入如下语句就可解决子窗体总是留在父窗体左下脚的问题
    action:=cafree; 
      

  5.   

    在子窗体的OnClose事件中:
    action:=cafree;