Discussion Locked

Remove App from TaskManager with VB6

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Does anyone know how to terminate or remove an application with "running" status from Windows' TaskManager using Visual Basic 6 code.
I am shelling i.e. "Shell" other applications from Visual program and I need to find a way to remove them from the task manager when I am done with them.
Any ideas?

1 reply

by rrv

If you shell - you do not have the process id. So you have to use findwindow api with the caption bar string and get the window hwnd. Findwindow will give you the hwnd and with that you can do a killprocess api or use a sendkeys to talk to the program and close. Instead of shell use CreateProcess APi with which you have more control.

This discussion is closed to new replies.