|
|
|
start date: Thu, 23 Aug 2007 15:24:32 +0100,
posted on: microsoft.public.dotnet.languages.csharp
back
| Thread Index |
|
1
Waldy
|
|
2
Nicholas Paldino [.NET/C# MVP]
|
|
3
Marc Gravell
|
|
4
Waldy
|
Shell Execute to open a URL
Hi there,
why can't I open a browser window with a URl using
ShellExecute? I have tried every combination of File, Parameters and
Operation but it never works. You can enter the following:
iexplore http://www.microsoft.com
in Start / Run and it will launch, so why not from ShellExecute?
Date:Thu, 23 Aug 2007 15:24:32 +0100
Author:
|
Re: Shell Execute to open a URL
Waldy,
Are you specifically trying to get ie to open the url, or the default
browser? Either way, you should be using the Process class in the
System.Diagnostics namespace to start the process. If you want IE to open
the URL, you can pass iexplore as the executable name. If you want the
default browser, then you should be passing the URL to the Process class and
the OS will determine how to open the URL.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Waldy" wrote in message
news:eZ$CUFZ5HHA.4928@TK2MSFTNGP05.phx.gbl...
> Hi there,
> why can't I open a browser window with a URl using
> ShellExecute? I have tried every combination of File, Parameters and
> Operation but it never works. You can enter the following:
>
> iexplore http://www.microsoft.com
>
> in Start / Run and it will launch, so why not from ShellExecute?
>
Date:Thu, 23 Aug 2007 10:33:11 -0400
Author:
|
Re: Shell Execute to open a URL
System.Diagnostics.Process.Start("http://www.microsoft.com");
Marc
Date:Thu, 23 Aug 2007 15:31:56 +0100
Author:
|
Re: Shell Execute to open a URL
"Marc Gravell" wrote in message
news:Or$p4IZ5HHA.5740@TK2MSFTNGP04.phx.gbl...
> System.Diagnostics.Process.Start("http://www.microsoft.com");
>
> Marc
>
How simple is that? Thanks guys!
Date:Thu, 23 Aug 2007 15:38:37 +0100
Author:
|
|
|