0

I am using windows application for my project in VB.Net. Now Whenever my application runs and then user kill the process from task manager, i want any event from that that when user kill application from task manager.

Is there any way to find out any event when user kill process of my application from task manager?

So can anyone give some idea for the same.

thanks in advance.

Brijesh Patel
  • 2,901
  • 15
  • 50
  • 73
  • 1
    possible duplicate of [How to do something before process get killed in windows](http://stackoverflow.com/questions/5252662/how-to-do-something-before-process-get-killed-in-windows) – sloth Oct 26 '12 at 09:00
  • possible duplicate of [How to detect a Kill Process event](http://stackoverflow.com/questions/1372250/how-to-detect-a-kill-process-event) – sloth Oct 26 '12 at 09:00

1 Answers1

0

There is no way your application can be notified when the user kills the app from the Task Manager.

What you can do is run a separate process which monitors your application, and when your application is killed do whatever you want to do in that second process. This is usually not a very good idea though, but it depends a bit on the problem you're trying to solve.

Rolf Bjarne Kvinge
  • 19,253
  • 2
  • 42
  • 86