标签:
1.
protected override void OnFormClosing(FormClosingEventArgs e) { e.Cancel = true; base.OnFormClosing(e); }
2.
private bool isEnableCloseButton = false; protected override CreateParams CreateParams { get { if (isEnableCloseButton) { CreateParams parameters = base.CreateParams; return parameters; } else { int CS_NOCLOSE = 0x200; CreateParams parameters = base.CreateParams; parameters.ClassStyle |= CS_NOCLOSE; return parameters; } } }
标签:
原文地址:http://www.cnblogs.com/zhongxinWang/p/4629867.html