How to terminate a running application?
Posted on 2003-03-11
Let me be specific about my question.
After I run a visual basic project, I want to terminate the running application by pressing a Button in a form.
I made the exe file from the project I wrote. After I run the exe file, and after I am done with the application I am closing the application to terminate it. After I close the application in the Windows Task Manager I still see the .exe file in the processes tab (of windows Task Manager) and the name of the running application in the Application tab.
The number of times that I access the exe file, that many number of .exe files are in the Windows task manager(In the processes tab). So I am in a need of terminating each application and .exe by pressing the end task button in the windows task manager.
Basically I need the Visual Basic code which I could put under a Button_click method in a form. So that I could press it to terminate the application without leaving the .exe still running in the windows task manager. If any one knows the solution to this please help me on this.