Question

I have the following code:

Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + "\\Internet Explorer\\iexplore.exe", "http:\\\\someurl.com");

It runs fine, but opens two instances of IE (Needless to say, I'm expecting one). Is there something obvious I'm missing here, or is it a more detailed issue? I'm using Visual C# 2010 Express if that matters, and .NET 4 Client Profile.

Était-ce utile?

La solution

Try removing the exe path to IExplore and just let Process start the link, in my experience this should open in a new Tab not window

Example:

Process.start("http:\\\\someurl.com");
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top