close
範例:http://www.dotblogs.com.tw/atowngit/archive/2009/12/26/12678.aspx
System.Diagnostics.ProcessStartInfo pInfo = new System.Diagnostics.ProcessStartInfo();
pInfo.UseShellExecute = true;
System.Diagnostics.Process p = null;
try {
p = System.Diagnostics.Process.Start(@"C:\a.txt");//檔案路徑
}
catch (System.ComponentModel.Win32Exception ex){
MessageBox.Show(ex.Message);
}
finally{
if (p != null)
p.Close();
}
全站熱搜