强
强少爷
Unregistered / Unconfirmed
GUEST, unregistred user!
//我用asp.net+c#,代码如下:
//进程表可以顺利读取
//但最终不结束我指定的QQ.exe进程。百思不得期解,请高手指点!感谢!
//############################################
private void Page_Load(object sender, System.EventArgs e)
{
//ListBox1是网页控件
System.Diagnostics.Process[] processOnComputer = System.Diagnostics.Process.GetProcesses();
foreach ( System.Diagnostics.Process p in processOnComputer )
{
this.ListBox1.Items.Add(p.ProcessName);
}
ListBox1.SelectedValue ="QQ";//指定的进程名
//关闭某个指定的进程:
System.Diagnostics.Process[] process = System.Diagnostics.Process.GetProcessesByName(this.ListBox1.SelectedItem.ToString()+".exe"
foreach ( System.Diagnostics.Process p in process)
{
p.Kill();
}
}
//########################################
//进程表可以顺利读取
//但最终不结束我指定的QQ.exe进程。百思不得期解,请高手指点!感谢!
//############################################
private void Page_Load(object sender, System.EventArgs e)
{
//ListBox1是网页控件
System.Diagnostics.Process[] processOnComputer = System.Diagnostics.Process.GetProcesses();
foreach ( System.Diagnostics.Process p in processOnComputer )
{
this.ListBox1.Items.Add(p.ProcessName);
}
ListBox1.SelectedValue ="QQ";//指定的进程名
//关闭某个指定的进程:
System.Diagnostics.Process[] process = System.Diagnostics.Process.GetProcessesByName(this.ListBox1.SelectedItem.ToString()+".exe"
foreach ( System.Diagnostics.Process p in process)
{
p.Kill();
}
}
//########################################