Code To Disable X(Close) Button On Your Form

Friday, 8 July 2011
Just Add The Following Code Anywhere In Your Windows Application And Your X(Close) Button Will Be Disables.
private const int dis_close_button = 0x200;
protected override CreateParams CreateParams
{
get
{
CreateParams ObjCP = base.CreateParams;
ObjCP.ClassStyle = ObjCP.ClassStyle | dis_close_button ;
return ObjCP;
}
}

0 comments:

Post a Comment