Opening a URL in an external Browser?

  • Thread starter Anil Gupte/iCinema.com
  • 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,
 
K

kimiraikkonen

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
 
A

Anil Gupte/iCinema.com

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
 
O

\(O\)enone

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. :)
 
M

Martin H.

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
 

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

Top