Hi all, Here I am trying to explain you how to disable the windows Form's close button by using our C# coding in DotNet. Just copy the following code in your code behind. Then run the form, surely the close button would be disabled. {codecitation class="brush: c#; gutter: true;" width="500px"} private const int CP_NOCLOSE_BUTTON = 0x200; protected override CreateParams CreateParams { get { CreateParams myCp = base.CreateParams; myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON; return myCp; } }
{/codecitation} ...S.VinothkumaR. http://vinothnat.blogspot.com
|