我在使用     ShellExecute(handle,nil,Pchar(GetNewAdLink),nil,nil,sw_shownormal); 时,它老是在原有的IE窗口中打开新的网址,我想让它在新的IE窗口中打开网址,不知道能不能办到?
如果不能办到,如果使用让一个网址在新的IE窗口中打开呢?

解决方案 »

  1.   

    ShellExecute(0, 'open', pchar('C:\Program Files\Internet Explorer\IEXPLORE.EXE'),
                   NIL, NIL, SW_NORMAL);
    //这里最好自己取ie绝对地址
        ShellExecute(0, 'open', pchar('http://www.163.com'),
                   NIL, NIL, SW_NORMAL)
      

  2.   

    这种方法不太好用哦,有时候会正确在新窗口中打开,但有时却是覆盖掉原IE窗口,然后再打开一个新的IE窗口。
      

  3.   

    var
      si: TStartupInfo;
      pi: TProcessInformation;
    begin
      FillChar(si, SizeOf(si), #0);
      si.cb   :=   sizeof(STARTUPINFO);
      CreateProcess(nil,
        '"C:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://blog.csdn.net/shadowstar"',
        nil, nil, False, 0, nil, nil, si, pi);
    //  ShellExecute(0, 'open', 'C:\Program Files\Internet Explorer\IEXPLORE.EXE',
    //    'http://blog.csdn.net/shadowstar', nil, SW_SHOW);
    end;两种方法都可行
      

  4.   

    ShellExecute delphi有自带的说明的 看它的参数说明 很简单的
      

  5.   

    ShellExecute(handle,'opennew',Pchar(GetNewAdLink),nil,nil,sw_shownormal);