Shabdar.org
Webshabdar.org
close, running, application, how PDF Print E-mail
Written by Shabdar   
Monday, 02 February 2009 11:12

close, running, application, how

I 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

Comments
Add New Search
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
Please input the anti-spam code that you can read in the image.
Last Updated on Thursday, 05 February 2009 11:02