Im using this code to try to block closing keys, but alt-f4 still closes the form.
protected override void OnKeyDown(KeyEventArgs e) {
if (e.KeyData==Keys.F4||e.Modifiers==Keys.Alt)
{
e.SuppressKeyPress = true;
e.Handled = false;
}
}
The purpose was to stop these keypresses, add an exit button(the only way to close the form) and get a password before letting the form close.