views:

177

answers:

3

In normal C# desktop apss, you can launch a URL by saying:

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

but System.Diagnostics.Process on windows mobile doesn't seems have that string overload.

A: 

Looks like this blog has your solution

http://www.businessanyplace.net/?p=code#startapp

It uses the CreateProcess call

John Nolan
A: 

According to http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx , http://msdn.microsoft.com/en-us/library/d8fz649y.aspx , and http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.filename.aspx you should be able to do:

ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "http://www.stackoverflow.com";
Process.Start(psi);

However, I haven't tested this on CF.

Matthew Flaschen
+1  A: 

This has worked for me in WindowsMobile:

try
{
 System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
 myProcess.StartInfo.UseShellExecute = true;
 myProcess.StartInfo.FileName = url;
 myProcess.Start();
}
catch (Exception e) {}
kgiannakakis