调用 IE: 

System.Diagnostics.Process myProcess = new System.Diagnostics.Process(); 
myProcess.StartInfo.FileName = "iexplore.exe"; 
myProcess.StartInfo.Arguments = " http://www.net0and1.com/"; 
myProcess.Start(); 

调用默认浏览器: 
    string target= "http://www.net0and1.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); 
        }

相关文章:

  • 2021-07-11
  • 2021-11-22
  • 2021-09-02
  • 2021-09-27
  • 2021-11-04
  • 2021-10-15
  • 2021-12-10
猜你喜欢
  • 2021-09-08
  • 2021-08-27
  • 2021-11-22
  • 2021-11-17
  • 2021-07-21
  • 2021-05-20
  • 2021-07-03
相关资源
相似解决方案