/// 3. ????????????????????
/// </summary>
private void button3_Click(object sender?? EventArgs e)
{
try
{
Process proc = Process.Start(appName);
if (proc != null)
{
proc.WaitForExit();
MessageBox.Show(String.Format("?????? {0} ????????"?? this.appName)?? this.Text??
MessageBoxButtons.OK?? MessageBoxIcon.Information);
}
}
catch (ArgumentException ex)
{
MessageBox.Show(ex.Message?? this.Text?? MessageBoxButtons.OK?? MessageBoxIcon.Error);
}
}
/// <summary>
/// 4. ????????????????????????
/// </summary>
private void button4_Click(object sender?? EventArgs e)
{
try
{
//?????????
Process proc = Process.Start(appName);
if (proc != null)
{
//??????????
proc.EnableRaisingEvents = true;
//?????????????
proc.Exited += new EventHandler(proc_Exited);
}
}
catch (ArgumentException ex)
{
MessageBox.Show(ex.Message?? this.Text?? MessageBoxButtons.OK?? MessageBoxIcon.Error);
}
}
/// <summary>
///???????????????
/// </summary>
void proc_Exited(object sender?? EventArgs e)
{
MessageBox.Show(String.Format("?????? {0} ????????"?? this.appName)?? this.Text??
MessageBoxButtons.OK?? MessageBoxIcon.Information);