首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

winform中怎样终止一个程序的运行(急),该如何解决

2012-02-23 
winform中怎样终止一个程序的运行(急)各位大虾:winform中怎样终止一个程序的运行,就象.net中的Response.En

winform中怎样终止一个程序的运行(急)
各位大虾:
winform中怎样终止一个程序的运行,
就象.net中的Response.End()

[解决办法]
如果要结束其他应用程序用
: Process[] proList = Process.GetProcesses();
foreach (Process tempProcess in proList)
{
if (tempProcess.ProcessName == "你要结束的")
{
tempProcess.Kill();
}
}
如果是本身,则:
Application.Exit();

热点排行