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
Subscribe FormClosing event
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = e.CloseReason == CloseReason.UserClosing; }
Only one line in the method body.