我想判断某个子窗体是否已经被显示,用FindWindow无论在什么状态下返回都不是0。
我的语句是这样的:
if FindWindowEx('TfrmModiPoint','frmModiPoint')=0 then各位大虾帮帮忙。

解决方案 »

  1.   

    var
      I: Integer;
    begin
      with Form1 do
        for I := MDIChildCount-1 downto 0 do
          if MDIChildren[I].ClassNameIs('TfrmModiPoint') thenend;————————————————————————————————————
    宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
    ————————————————————————————————————
      

  2.   

    如果你是指当前显示的是否是TfrmModiPoint,可用:
    if Form1.ActiveMDIChild.ClassNameIs('TfrmModiPoint') then————————————————————————————————————
    宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
    ————————————————————————————————————