c# - How to delay shutdown of an application when user logs off or shuts down Windows? -


I am writing an application that runs in the background to turn off from startup, and in some cases the application is displayed to me There is a need for the user to choose whether to continue the shutdown or not. This app will only be running on Windows, but may be running on any version since 2000.

Although I have certainly done some research on this subject, the way the information about shutting down windows applications (shutdown) seems to be a little scattered if anyone has this subject The best way to handle it, or additional information about the subject, I appreciate it (I have very little experience with C #).

Thank you!

badPanda

EDIT: I know that blocking off is not considered good practice. This is an important business requirement for this application.

EDIT: At the suggestion of many commentators below (to redesign that stop blocking is unnecessary), I have used a NotifyIcon Balloon popup to notify users below While application is sending data though it is unlikely to stop data from being on a local computer for a few weeks, but I think it is the best practice and professional requirements There is a good agreement between After all, if the users are stupid ... okay, the user will be stupid.

Good, the MSDN article written by you clearly states: If your app is on Vista or Win 7 If you are running then you can not stop Windows from shutting down. Indication to the user is not working, the dialogue will be inaccessible. You need to consider the app design that works with it.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -