How to disable Suspending || Closing || Terminatin

2019-01-15 22:14发布

问题:

I'm a french developer and I need to develop an Metro Style app for Windows 8 Pro who is always launched. I wanted to know how can I disable the close event of my app. My app need to be in front all the time and the user couldn't quit the app.

I thought I could disable all the shortcut with the GPO but the close gesture (drag the app from the top to the bottom) need to me disabled too.

I hope I was clear and everybody will understand the question :-). Feel free to ask me more specific questions.

Cordially Renaud.

回答1:

The short answer is: You can't.

The operating system and the user control the lifetime of Metro Style apps, you can't block the user from switching away from your app and once your app is no longer in the foreground, the application is suspended and the system can terminate the application at any moment.

Similarly, the user close gesture cannot be blocked.



回答2:

In Windows 8.1 you may find Kiosk Mode to be what you need.