ProcessStartInfo & CreateNoWindow not launching new window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code:

Dim BrowserLauncher As New ProcessStartInfo
BrowserLauncher.FileName = URL BrowserLauncher.CreateNoWindow =
False
BrowserLauncher.UseShellExecute = True
BrowserLauncher.WindowStyle = ProcessWindowStyle.Maximized
Process.Start(BrowserLauncher)

Each time I run this, IE does NOT open a new browser window but instead
uses a current browser I already have open.

Anyone know away around this? I'm coding from VB.NET windows form
trying to launch a web page.

Note: If I don't have any browser open at all, a new browser IS
launched.

Any help would be appreciated.

7078895
 
Because you are passing the url as the filename to execute, I am sure the
windows shell see's a process already exists to handle this command then
routes it straight there.

It is the same as going to start->run, then typing in a url.

If you want a new window to open each time, you will need to start the
iexplore.exe process. If you pass the URL as a command argument it will
open a new window each time as it is actually starting the iexplore.exe
process.

BrowserLauncher.Filename = "c:\program files\internet explorer\iexplore.exe"
(your own path will probably be here.)
BrowserLauncher.Arguments = URL

HTH,

bill

PS, nice cross post.
 
Back
Top