Solved

ShellExecute

Posted on 2000-03-21
6
282 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
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!

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

732 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