1 /// <summary> 2 /// 窗体屏蔽 ALT+F4组合键强制关闭 3 /// </summary> 4 protected override CreateParams CreateParams 5 { 6 get 7 { 8 const int CS_NOCLOSE = 0x200; 9 CreateParams cp = base.CreateParams; 10 cp.ClassStyle = cp.ClassStyle | CS_NOCLOSE; 11 return cp; 12 } 13 }