當前位置:編程學習大全網 - 電腦編程 - C#編程如何實現“選擇打開方式”對話框

C#編程如何實現“選擇打開方式”對話框

string filePath = "File Path";

Process.Start("rundll32.exe", "shell32.dll, OpenAs_RunDLL " + filePath);

或者

ProcessStartInfo startInfo = new ProcessStartInfo()

{

WindowStyle = ProcessWindowStyle.Normal,

FileName = fileName,

Verb = "openas",

UseShellExecute = true,

ErrorDialog = true

};

Process.Start(startInfo);

  • 上一篇:隧道橫斷面的確定
  • 下一篇:NC代表什麽行業?
  • copyright 2024編程學習大全網