Click here to Skip to main content
13,597,195 members
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

14.6K views
13 bookmarked
Posted 4 Apr 2011
Licenced CPOL

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

, 4 Apr 2011
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

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

You may also be interested in...

Comments and Discussions

 
GeneralReason for my vote of 5 nice share Pin
Ridho Anggoro4-Apr-11 23:11
memberRidho Anggoro4-Apr-11 23:11 
GeneralRe: thanks Pin
charles henington6-Apr-11 4:42
membercharles henington6-Apr-11 4:42 

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04-2016 | 2.8.180621.3 | Last Updated 4 Apr 2011
Article Copyright 2011 by charles henington
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid