| close, running, application, how |
|
|
|
| Written by Shabdar |
| Monday, 02 February 2009 11:12 |
close, running, application, howI ineed a way to kill running processes in the task manager from a VB.NET application. I am programming a Visual Basic (Visual Studio .net) program than opens word documents and copy the source into the destination word document. Then problem is that after a few hours, I have literally hundreds of winword.exe processes running the task manager. When I start a new word application and open up a word document from a VB program, is there a way to close it down so the process is not running or is there another way to kill the winword.exe process?
Rank: Wizard aelatik:You can do that with existing .NET methods, here you go :
Dim myProcesses() As Process = Process.GetProcesses Dim myProcess As Process For Each myProcess In myProcesses If (myProcess.ProcessName.ToLower = "winword") Then myProcess.Kill() End If Next |
| Last Updated on Thursday, 05 February 2009 11:02 |