Solved

ShellExecute

Posted on 2000-03-21
6
281 Views
Last Modified: 2010-04-04
When i use ShellExecute function to open a html document, it is opened in an existing instance of the browser (when the browser is opened).

How can I open the document creating another instance of the browser ?

Thanks

Gustavo
0
Comment
Question by:voxel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 7

Expert Comment

by:RBertora
ID: 2640532
Use createPorcess:

var
  StartUpInfos: TStartUpInfo;
begin
  ZeroMemory(@StartUpInfos, sizeOf(TStartUpInfo));
  StartUpInfos.cb := SizeOf(StartUpInfos);
  CreateProcess(nil, PChar(CommandLine), nil, nil, false, 0, nil, nil, StartUpInfos, Result);
end;

Rob;-)
0
 

Author Comment

by:voxel
ID: 2640978
Do I have to include the path to the browser executable in CommandLine ?

I would like to open the document in the default browser.
0
 
LVL 1

Expert Comment

by:duke_n
ID: 2641012
listenin'
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:rwilson032697
ID: 2643223
Lurking...
0
 
LVL 7

Accepted Solution

by:
RBertora earned 50 total points
ID: 2643905
Hi ,
yes you can pass the url as a parameter:

procedure TForm1.Button1Click(Sender: TObject);
var
  StartUpInfos: TStartUpInfo;
  Result : TProcessInformation;
begin
  ZeroMemory(@StartUpInfos, sizeOf(TStartUpInfo));
  StartUpInfos.cb := SizeOf(StartUpInfos);
  CreateProcess(nil, PChar('C:\Program Files\Plus!\Microsoft Internet\Iexplore.exe http://www.yahoo.com'), nil, nil, false, 0, nil, nil, StartUpInfos, Result);
end;


Rob;-)

P.S. sorry about the first post, I left out the declaration for Result.
0
 

Author Comment

by:voxel
ID: 2644467
It works when I know that Internet Explore is the default browser.

But I can use your answer to solve my problem.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question