• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

Force IE to open each *.url in new window

I have a set of url-files.
If I use ShellExecute some url-files opening in already existing IE window.

How to force IE to open each file in new window.
0
lmikle
Asked:
lmikle
1 Solution
 
DaFoxCommented:
Hi lmikle!

Since this is a browser specific thing (internal options AFAIK) there's no way to load a URL in a new window of your standard browser via ShellExecute.
However, there is a way to do so if you always want to use IE:

{ uses URLMon }

procedure TForm1.Button1Click(Sender: TObject);
begin
  HlinkNavigateString(nil, 'http://www.experts-exchange.com');
end;

Markus
0
 
smotCommented:
0
 
BTechoCommented:
Hi.

Just use ShellExecute, include -new in the parameters before the url, telling Internet Explorer to open in a new window.

ShellExecute(Handle,'open','IExplore.exe','-new www.google.com' ,nil,SW_SHOW);


For more info,

Internet Explorer command line switches:
This link mentions 4.0, but it has been tested and the parameters also work with 6.0.
http://support.microsoft.com/default.aspx?scid=KB;en-us;q178058

ShellExecute:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp
0
 
CleanupPingCommented:
lmikle:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
BTechoCommented:
I think my answer is correct, it's simple, it works and does use ShellExecute ;-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now