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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…