Home > Net > C # how to prevent external program shut down
C # how to prevent external program shut down
Time:09-17
Notepad, for example, how to stop notepad closed, use win32API, can let its minimize, maximize, close, just don't know how to stop him close, said there are ideas, intercept all WM_CLOSE, judge whether the program I need to have a teacher, how to intercept WM_CLOSE, and stop, thank you ~
CodePudding user response:
If I pass the task manager to kill the program???????
CodePudding user response:
You can't this implementation! Even the resource manager can be killed, how can you prevent shut down? If simply to ban the user closes the, hidden close button, If you want to keep alive the program, you can write a service to monitor whether the program is running, if you are off on the resumption of the program,