The IsWindow function determines whether the specified window handle identifies an existing window. BOOL IsWindow(    HWND hWnd  // handle of window
   );
 ParametershWndSpecifies the window handle.  Return ValuesIf the window handle identifies an existing window, the return value is nonzero.
If the window handle does not identify an existing window, the return value is zero.

解决方案 »

  1.   

    方法很多啊,只要是能取得窗体属性的函数都可以.比如:
    GetWindowRect()本来是用来取得一个窗体的矩形范围,调用失败返回0,也就是窗体不存在了, ......
    我还是觉得楼上的方法是最好的.
      

  2.   

    方法很多啊,只要是能取得窗体属性的函数都可以.比如:
    GetWindowRect()本来是用来取得一个窗体的矩形范围,调用失败返回0,也就是窗体不存在了, ......
    我还是觉得楼上的方法是最好的.
      

  3.   

    if Assigned(Form2.handle) then
    //...存在
    else
    //...Form2.handle已被free,或未创建