Process.Start() question.

  • Thread starter Thread starter Ilya Dubov
  • Start date Start date
I

Ilya Dubov

I am starting "iexplore" process by executing Process.Start command. Every
time I execute this command, it creates a new window.



Can somebody tell me what can I do, so that the new window only been created
once, and the next time I execute Process.Start command



it would just update an old window with the new url.

Thanks

Here is the code I execute.

/***********************************************

Process proc = new Process();

ProcessStartInfo procInfo = new ProcessStartInfo();

procInfo.FileName = "iexplore.exe";

procInfo.Arguments = "https://www.microsoft.com/";


proc.StartInfo = procInfo;

proc.Start();
 
Ilya,

I think the easiest way to do that would be to use IE automation
instead (reference Shdocwv.dll).



Mattias
 
You need to add the reference to your project for the com component
(Shdocwv.dll). That is right clickon your project, click on the com tab and
then choose Microsoft Internet Controls - this will add the control to your
project.

To use the control just use
ControlName.Navigate(url)



Ilya Dubov said:
Thank you for your reply, but can you please be a little bit more specific.

Thanks
 
Back
Top