process类的使用

//process类的名空间

using System.Diagnostics; 

Start 启动进程资源将其与process类关联

Kill立即关闭进程

waitforExit 在等待关联进程的退出

Close 释放与此关联的所有进程 

 

  //启动office中的EXCEl
  void ButtonClick(object sender, System.EventArgs e)
  {
   Process.Start("EXCEL.exe");
  }
  //启动WINDOWS播放器
  void Button2Click(object sender, System.EventArgs e)
  {
   Process.Start("dvdplay.exe");

  } 

 

相关文章: