ProcessStartInfo & CreateNoWindow not launching new window

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
 
W

William F. Robertson, Jr.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top