如题,谢谢

解决方案 »

  1.   

    应该说:如何判断form是否已经show了出来?
      

  2.   

    if formName=nil then
       showmessge('该窗体没有打开')
      

  3.   

    to bestluo(要学) 
      
    我试了下,有点问题;无论form是否打开,其FormName都不等于nil;
      

  4.   

    if not Assigned(Form) then//判断你要的窗体是否存在
      application.create(TForm,Form1);//没有的话创建
    form1.showmodal;//有的话显示
    form1.free;//释放窗体
      

  5.   

    if not assigned(Form) then
     begin 
      Form:=Tform.create(nil);
     try
       Form.showmodal;
     finally
       Form.free;
       Form:=nil;
     end;
     end;
      

  6.   

    if assign(form) then showmessage('窗体已经存在:)');
      

  7.   

    Assigned(Form)返回true时Form不存在
      

  8.   

    Sorry,Assigned(Form)返回true时Form存在
      

  9.   

    你可以这样的,formname:=nil;
              
    然后中:
    if formname=nil then
    begin
    fromname:=tformname.create(self);
    showmessge('该窗体已经创建')
    formname.show;
    end;