How can I prevent a user from closing my C# application?

前端 未结 4 1878
陌清茗
陌清茗 2020-11-30 08:27

How to make unclosed application in C#? I want to disable the \'X\' button of the form and prevent the Windows Task Manager from closing it as well.

I know that one

4条回答
  •  半阙折子戏
    2020-11-30 09:05

    You should never do things like this, but if you really need this you should create a service.

提交回复
热议问题