引用: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/“);

 

 

 

相关文章:

  • 2022-02-01
  • 2022-12-23
  • 2021-11-30
  • 2021-08-22
  • 2021-11-04
  • 2021-05-24
猜你喜欢
  • 2021-12-05
  • 2021-09-15
  • 2021-10-16
  • 2021-06-15
相关资源
相似解决方案