如何在Visual Studio.NET 2008中使用“计时器”来终止特定进程

时间:2011-11-30 17:32:26

标签: vb.net

如何在CPU处于控制之下终止进程

我正在设计一个项目作为我在大学学习的一部分,但我的主管不知道这个主题,他没有希望帮助我。

所以我有机会继续,这个机会就是你的网站,请帮助我。

1 个答案:

答案 0 :(得分:0)

我不确定你在问什么,但这里是如何在VB.NET中杀死一个进程:

' get all processes by name
' where 'process_name' is the name of the process you want to kill
Dim arrProcess() As Process = System.Diagnostics.Process.GetProcessesByName("process_name")

' kill all processes returned
For Each p As Process In arrProcess
    p.Kill() 
Next

您可以将其设置为自己的Sub,并在引发计时器事件时调用它

另请参阅:http://vbnetsample.blogspot.com/2007/08/start-and-kill-process.html

这里还有一些问题涉及VB中的流程管理