Terminate a task in vb6

Here is a visual basic code to terminate a task. You will have to use this in many places. For example, when installing a new version of your program you will have to terminate the old one and then uninstall it. You can call the TerminateTask(app_name) function to terminate any running application. You can copy and paste this code to the program.

To see if the code is working, open notepad, then call the function TerminateTask(“Untitled – Notepad”). The notepad will close now.

Leave a Reply

Your email address will not be published. Required fields are marked *