有些程序自动打开IE,
我想写程序自动关闭IE

解决方案 »

  1.   

    SendMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
      

  2.   

    procedure TForm1.Button1Click(Sender: TObject);
      function EnumWindowsCode(Wnd: hWnd; unUsed: Integer): Boolean; stdcall;
      var
        Buffer: Array[0..MAXBYTE-1] of Char;
      begin
        Result := True;
        GetClassName(Wnd, Buffer, MAXBYTE);
        if Buffer = 'IEFrame' then
          SendMessage(Wnd, WM_SYSCOMMAND , SC_CLOSE, 0);
      end;
    begin
      EnumWindows(@EnumWindowsCode, 0);
    end;————————————————————————————————————
    宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
    ————————————————————————————————————
      

  3.   

    to:  lxpbuaa(桂枝香在故国晚秋)果然是大侠,问题已经解决,在下感激不尽。