DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us