How to Disable Alt + F4 closing form?

后端 未结 11 1550
遇见更好的自我
遇见更好的自我 2020-11-29 21:23

What is the best way to disable Alt + F4 in a c# win form to prevent the user from closing the form?

I am using a form as a popup dialog to dis

11条回答
  •  既然无缘
    2020-11-29 22:08

    Would FormClosing be called even when you're programatically closing the window? If so, you'd probably want to add some code to allow the form to be closed when you're finished with it (instead of always canceling the operation)

提交回复
热议问题