How to launch url in default browser from winmobile app?

In normal C # desktop apss, you can run the url by specifying:

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

      

but System.Diagnostics.Process on Windows Mobile doesn't seem to have such line overload.

0


a source to share


3 answers


This worked for me on WindowsMobile:



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

      

+1


a source


Looks like this blog has your solution

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



It uses the CreateProcess call

0


a source


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 , which you must execute:

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

      

However, I have not tested this on CF.

0


a source







All Articles