// using System
private string appName =
/// <summary>
///
/// </summary>
private void button
{
Process
MessageBox
MessageBoxButtons
}
/// <summary>
///
/// </summary>
private void button
{
try
{
Process proc = Process
if (proc != null)
{
proc
if (proc
MessageBoxButtons
else
{
// 如果外部程序沒有結束運行則強行終止之
proc
MessageBox
}
}
}
catch (ArgumentException ex)
{
MessageBox
}
}
/// <summary>
///
/// </summary>
private void button
{
try
{
Process proc = Process
if (proc != null)
{
proc
MessageBox
MessageBoxButtons
}
}
catch (ArgumentException ex)
{
MessageBox
}
}
/// <summary>
///
/// </summary>
private void button
{
try
{
//啟動外部程序
Process proc = Process
if (proc != null)
{
//監視進程退出
proc
//指定退出事件方法
proc
}
}
catch (ArgumentException ex)
{
MessageBox
}
}
/// <summary>
///啟動外部程序退出事件
/// </summary>
void proc_Exited(object sender
{
MessageBox
MessageBoxButtons
From:http://tw.wingwit.com/Article/program/net/201311/13876.html