Click here to Skip to main content
13,189,324 members (70,311 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

2.9K views
Posted 27 Jun 2011

Disable the Close box on a form

, 29 Jun 2011
Rate this:
Please Sign up or sign in to vote.
I have used this in the past and have also posted as one of my tip tricks :-} One tip trick that I still like with CreateParams is changing parms.ClassStyle |= 0x200; to parms.ClassStyle = this.Handle.ToInt32(); which will render the form invisible which is much easier than overriding...
I have used this in the past and have also posted as one of my tip tricks :-}
One tip trick that I still like with CreateParams is changing
parms.ClassStyle |= 0x200;

to
parms.ClassStyle = this.Handle.ToInt32();

which will render the form invisible which is much easier than overriding
SetVisibleCore(bool value)

because you then have to have another bool value to ensure the FormLoad Event is called.

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

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171016.2 | Last Updated 29 Jun 2011
Article Copyright 2011 by charles henington
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid