Click here to Skip to main content
Click here to Skip to main content

Disabling Close Button (X in top right corner of ControlBox)

By , 4 Apr 2011
 
private const int disableX = 0x200;
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams ObjClose = base.CreateParams;
                ObjClose.ClassStyle = ObjClose.ClassStyle | disableX;
                return ObjClose;
            }
        }

License

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

About the Author

charles henington
United States United States
Member
I do not claim to be wrong! I just rarely ever write.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralRe: I think that using API functions to do this job is better th...memberYouzelin5 Jul '11 - 21:36 
GeneralReason for my vote of 3 I think using API to do this job is ...memberYouzelin4 Jul '11 - 20:56 
GeneralRe: Well if you think so where is the Alternative???? membercharles henington5 Jul '11 - 14:08 
GeneralReason for my vote of 5 small good tipmemberboh-unipac13 Apr '11 - 6:44 
GeneralRe: Thanks hope it helps membercharles henington18 Apr '11 - 5:08 
GeneralReason for my vote of 5 nice sharememberRidho Anggoro4 Apr '11 - 23:11 
Reason for my vote of 5
nice share
GeneralRe: thanksmembercharles henington6 Apr '11 - 4:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 4 Apr 2011
Article Copyright 2011 by charles henington
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid