Return to Snippet

Revision: 9187
at October 24, 2008 20:36 by pckujawa


Initial Code
string target= "http://www.microsoft.com";
    //Use no more than one assignment when you test this code. 
    //string target = "ftp://ftp.microsoft.com";
    //string target = "C:\\Program Files\\Microsoft Visual Studio\\INSTALL.HTM"; 

    try
        {
         System.Diagnostics.Process.Start(target);
        }
    catch
        ( 
         System.ComponentModel.Win32Exception noBrowser) 
        {
         if (noBrowser.ErrorCode==-2147467259)
          MessageBox.Show(noBrowser.Message);
        }
    catch (System.Exception other)
        {
          MessageBox.Show(other.Message);
        }

Initial URL
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q305703

Initial Description

                                

Initial Title
How to start the default internet browser programmatically by using Visual C-Sharp

Initial Tags
url, link, browser, c

Initial Language
C#