引用:using System.Diagnostics;
打開文件夾:
System.Diagnostics.Process.Start(FilePath);
打開文件夾中某個文件:
System.Diagnostics.Process.Start(FilePath+"/"+FileName);
打開文件夾並選中單個文件:
System.Diagnostics.Process.Start("Explorer", "/select,"+ FilePath+"\"+FileName);
或
System.Diagnostics.Process.Start("Explorer.exe", "/select,"+ FilePath+"\"+FileName);
用IE打開文件:
System.Diagnostics.Process.Start("Explorer",FilePath+"\"+FileName);
System.Diagnostics.Process.Start("Explorer.exe",FilePath+"\"+FileName);
注:(explorer,explorer.exe,select,不區分大小寫,"/selecet,"其中"/,"都不能少,FilePath為文件路徑不包含文件名)
打開文件夾並選中網頁
System.Diagnostics.Process.Start("Explorer.exe", ”http://www.sunwale.com/“);
