lothos12345
Junior Contributor
i have written a visual basic.net 2003 application and upon it closing I want it to kill all instances of the application that are running, so I used the code below
Dim proc() as Process
proc = Process.GetProcessesByName("AppName")
For Each SingleProcess as Process in Proc
SingleProcess.Kill
Next
The above code works generally well but there are occasions when it will not close all instances of the application and I am not sure why. If anyone can shed some light as to the reason, it would be greatly appreiciated.
Thanks
Dim proc() as Process
proc = Process.GetProcessesByName("AppName")
For Each SingleProcess as Process in Proc
SingleProcess.Kill
Next
The above code works generally well but there are occasions when it will not close all instances of the application and I am not sure why. If anyone can shed some light as to the reason, it would be greatly appreiciated.
Thanks