Disabling Minimize & Maximize On WinForm?
Set MaximizeBox
and MinimizeBox
form properties to False
The Form
has two properties called MinimizeBox
and MaximizeBox
, set both of them to false
.
To stop the form closing, handle the FormClosing
event, and set e.Cancel = true;
in there and after that, set WindowState = FormWindowState.Minimized;
, to minimize the form.