if (form1=nil) and (not assigned(form1)) then showmessage('窗体是不在内存中');
if FindWindow('窗体名')<>0 then showmessage('窗体在内存中');
if FindWindow('窗体标题名','')<>0 then showmessage('窗体在内存中');
窗体不在内存中的时候,用assigned(form1) 函数,提示没有定义 form1用这两种方法 //---------------------------------------------------------- if FindWindow('窗体名')<>0 then showmessage('窗体在内存中');if FindWindow('窗体标题名','')<>0 then showmessage('窗体在内存中');//------------------------------------------------------- 编译都提示出错: Character constant too long(or empty)
if FindWindow('窗体标题名','')<>0 then showmessage('窗体在内存中'); D7下编译通过啊
if FindWindow('YourFormClass','YourFormTitle')<>0 then showmessage('窗体在内存中');
//----------------------------------------------------------
if FindWindow('窗体名')<>0 then showmessage('窗体在内存中');if FindWindow('窗体标题名','')<>0 then showmessage('窗体在内存中');//-------------------------------------------------------
编译都提示出错:
Character constant too long(or empty)
D7下编译通过啊