using process.start to open a web page

  • Thread starter Thread starter bill
  • Start date Start date
B

bill

i'm using VS2005, VB.NET windows forms application
when I try to open a web page using process.start, i get an error:
"application not found"

I'm using this syntax:

System.Diagnostics.Process.Start("http://www.microsoft.com/")

It works if I do it like this (thank you HKW), but what if the user doesn't
use IE, but uses some other browser?

Dim psi As New ProcessStartInfo()
With psi
.FileName = "iexplore"
.Arguments = "-new http://dotnet.mvps.org/"
End With
Process.Start(psi)


Thanks
Bill
 
i'm using VS2005, VB.NET windows forms application
when I try to open a web page using process.start, i get an error:
"application not found"

I'm using this syntax:

System.Diagnostics.Process.Start("http://www.microsoft.com/")

It works if I do it like this (thank you HKW), but what if the user doesn't
use IE, but uses some other browser?

Dim psi As New ProcessStartInfo()
With psi
.FileName = "iexplore"
.Arguments = "-newhttp://dotnet.mvps.org/"
End With
Process.Start(psi)

Thanks
Bill

For instance, I changed default browser to Firefox from IE and the
syntax

System.Diagnostics.Process.Start("http://www.microsoft.com/")

worked well.(It was opened in IE when IE was default, it was opened in
Firefox when Firefox was default).

What's the exact problem?

or do you want your users to open link in Firefox explictly:
System.Diagnostics.Process.Start( _
"C:\Program Files\Mozilla Firefox\firefox.exe", _
"http://www.microsoft.com")

Hope this helps,

Onur Güzel
 
Kimi -

I saw that Heikki and Mark stole the front row from you today at Silverstone
- good luck tomorrow, though.

when I use
System.Diagnostics.Process.Start("http://www.microsoft.com/")

I get an error:

"application not found"
 
Kimi -

I saw that Heikki and Mark stole the front row from you today at Silverstone
- good luck tomorrow, though.

when I use
System.Diagnostics.Process.Start("http://www.microsoft.com/")

I get an error:

"application not found"

Bill,
Though it's just my nickname, thanks for your goodwill :)

However, i can't reproduce the problem you mentioned on XP, anyway
would you also try this:

Shell("explorer.exe http://www.microsoft.com", _
AppWinStyle.NormalFocus)

Hope this helps,

Onur Güzel
 
Back
Top