我建了一个MDI父窗口 一个MDIChild窗口 启动之后 子窗口不能关闭 点关闭子窗口最小化到父窗口下面 但是不关闭

解决方案 »

  1.   

    在子窗体的OnClose事件里添加代码
    ChildForm.Free;
    ChildForm := Nil;
      

  2.   

    在子窗口的onclose 事件中
    acion := cafree
      

  3.   

    在form.close的事件中
    加action:=cafree;
    给分!
      

  4.   

    选project->options,把childform移到右边
    调用子窗体时
    childform:=Tchildform.create(application);
    childform.show;
      

  5.   

    选project->options,把childform移到右边
    调用子窗体时
    childform:=Tchildform.create(nil);
    childform.show;
    关闭时在onClose事件中
    Active:=caFree;
      

  6.   


    改正:选project->options,把childform移到右边
    调用子窗体时
    childform:=Tchildform.create(nil);
    childform.show;
    关闭时在onClose事件中
    Active:=caFree;
    childform:=nil;
      

  7.   

    在子窗口的onclose 事件中
    acion := cafree
    加上一定OK