简体   繁体   中英

Get event on killing process of windows application from task manager in vb.net

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM