在运行一个主窗体,如何让子窗体不显示,只有当主窗体中进行操作(比如点击按钮才出现)?

解决方案 »

  1.   

    将子窗体的Visible属性设为false, 使用变量动态生成子窗体,要显示时就将Visible设为true就可以了。
      

  2.   

    动态创建窗体!进入Project options下的froms把你的了窗体从Auto create 移到 Available.forms中然后:
    procedure Tfrmmain.FupClick(Sender: TObject);//动态创建窗体
    var frmupdate:tfrmupdate;  
    begin
        frmupdate:=tfrmupdate.Create(application);//创建窗体
        frmupdate.Show;//显示窗体
    end;
      

  3.   

    uses rmupdate所在的单元文件
    procedure Tfrmmain.FupClick(Sender: TObject);//动态创建窗体
    begin
        frmupdate:=tfrmupdate.Create(application);//创建窗体
        frmupdate.Show;//显示窗体如果是子窗体的话可以不用这句
    end;
      

  4.   

    这个方法有很多,像jzzm说的对
      

  5.   

    yourchildform.hide;
    yourbuttonclick 
    yourchildform.show;
      

  6.   

    Project/options/froms/Auto create forms/你的主窗体