Preventing Windows shut down

前端 未结 7 623
梦毁少年i
梦毁少年i 2021-01-18 09:14

To detect and prevent shutdown the computer I use very simple program. It has only one form and one private procedure like below:

TForm3 = class(TForm)
priva         


        
7条回答
  •  天涯浪人
    2021-01-18 09:34

    I usually run "shutdown -a" command. You can do the same from your code to interrupt Windows from shutdown.

    Regards

提交回复
热议问题