Click here to Skip to main content
15,893,594 members
Articles / Programming Languages / C#

Disable Close Button from Title bar of a Window

Rate me:
Please Sign up or sign in to vote.
4.69/5 (4 votes)
8 Dec 2009CPOL 12.6K   3  
we can also override the CreateParams Code:[I did not write this code, but i found it a while back.]Visual C# .NET-------------------------------------------------#region "Disable the 'X'"protected override CreateParams CreateParams { get { CreateParams cp =...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
8 Dec 2009Abhishek Sur 1 alternative  
As a developer, you must have found few things that are really haven't thought of earlier. On that note, Say you want to disable Close Button of a window. It is easier to disable other button (using properties available with Form) from control box of the window, or even remove the control box...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions