- ·上一篇文章:C#应用程序之间相互通信的方法
- ·下一篇文章:设计模式之Singleton单态模式
C#Windows应用程序中打开网址的方法
:2012-11-22 23:20:16
在C#的Windows应用程序中打开网址需使用System.Diagnostics命名空间中的Process类,下面是源代码:
System.Diagnostics.Process.Start("http://www.k88.net");
或者使用下面的形式:
System.Diagnostics.Process.Start(@"C:\Program Files\Internet Explorer\IEXPLORE.EXE","http://www.k88.net");
上面两种形式中,第一种是以默认浏览器打开指定的网址
第二种是以指定的IE浏览器打开网址 。
C#Windows应用程序中打开网址的方法