Opening a URL in an external Browser?

  • Thread starter Thread starter Anil Gupte/iCinema.com
  • Start date Start date
A

Anil Gupte/iCinema.com

Sorry reposting for clarity...

Which one is better? This:

System.Diagnostics.Process.Start(URL)

or this?

Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = URL
Process.Start(psi)

And why?

Regards,
 
Sorry reposting for clarity...

Which one is better? This:

System.Diagnostics.Process.Start(URL)

or this?

Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = URL
Process.Start(psi)

And why?

Regards,

There's also another option:

Shell("explorer.exe http://www.google.com")

' Also

BTW, when you use "ProcessStartInfo" class, you're allowed to define
how your process will be launched. See members of that class using
IntelliSense.

Hope this helps,

Onur Güzel
 
Oh sure, confuse me even more...:-)

But which one is better?

--
Anil Gupte
www.keeninc.net
www.icinema.com
www.wizo.tv
Sorry reposting for clarity...

Which one is better? This:

System.Diagnostics.Process.Start(URL)

or this?

Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = URL
Process.Start(psi)

And why?

Regards,

There's also another option:

Shell("explorer.exe http://www.google.com")

' Also

BTW, when you use "ProcessStartInfo" class, you're allowed to define
how your process will be launched. See members of that class using
IntelliSense.

Hope this helps,

Onur Güzel
 
kimiraikkonen said:
There's also another option:
Shell("explorer.exe http://www.google.com")

That may well work, but I'd strongly advise against it because it always
opens using Internet Explorer. The other options presented by the OP will
observe the user's default browser settings, thereby not annoying the hell
out of them. :)
 
That may well work, but I'd strongly advise against it because it always
opens using Internet Explorer. The other options presented by the OP will
observe the user's default browser settings, thereby not annoying the hell
out of them. :)

The alternative would be:

Shell("cmd /C start http://www.google.com")

'Opens the standard browser.

Best regards,

Martin
 
Back
Top