怎么判断窗体是否在运行?

解决方案 »

  1.   

    你的运行是什么概念?生成就算?还是show出来才算?
      

  2.   

    if form2=nil then showmessage('');
      

  3.   

    Findwindow(Tform,form1)看findwindow的返回值就知道了
      

  4.   

    windows消息机制
    怎么用?Findwindow(Tform,form1)  怎么用?
      

  5.   

    if Assigned(Form1) then
       showmessage('窗体存在')
    else
       showmessage('窗体不存在')
      

  6.   

    if findwindow(nil,'form1)then
    begin
     showmessage('form1在内存中');
    end;
      

  7.   

    方法一: lianshaohua
    if findwindow(nil,'form1)then
    begin
     showmessage('form1在内存中');
    end;
    方法二:
    有个 Screen 属性,其中有个 Form 数组,从那里可以得到任何一个存在的窗体的任何属性或方法。