private void pbx_Exit_Click(object sender, EventArgs e)
{
Process[] pros = Process.GetProcesses();
for (int i = 0; i < pros.Length; i++)
{
if (pros[i].ProcessName == "WindowsFormSea.vshost.exe")
{
pros[i].Kill();
}
}
}
WinForm下点击按钮关闭项目所有的窗口(其实就是结束这个项目进程)
最新推荐文章于 2023-11-07 18:01:20 发布