

If the current process (in the loop) matches on both the process name and process ID, the process is killed. In the kill button click event handler we again loop through all of the running processes and we take the selected item from the process/ID list, and parse it into a string containing the process name and an integer value containing the ID. If you do want to kill off all running instances of an application, disregard the ID and kill all running processes with the same process name. Since you can have multiple processes with the same name, it was necessary to add in the ID along with the name in order to make some distinction between multiple instances of a single application, else, we would end up killing all running instances of the application which may or may not be desirable depending upon what you are doing. The last bit of the code in the application is used to kill a running process.

''' ''' ''' ''' Private Sub btnUpdateProcessList_Click( ByVal sender As System. ''' ''' Manually update the list of runnings
