Home All Groups Group Topic Archive Search About

Cani I hide the X in controlbox

Author
24 Sep 2006 7:48 PM
ngr
I have a form which I want to prevent the user from clicking the X in the
right corner of the control to close it.
At the same time I want to retain the minimise and maximise buttons on the
control.

Is there a way of disabling or removing the X button off the title bar
alone.

Thanks in advance.

Author
24 Sep 2006 7:52 PM
Herfried K. Wagner [MVP]
"ngr" <n**@tdrd.karoo.co.uk> schrieb:
>I have a form which I want to prevent the user from clicking the X in the
>right corner of the control to close it.
> At the same time I want to retain the minimise and maximise buttons on the
> control.
>
> Is there a way of disabling or removing the X button off the title bar
> alone.

Check out the code samples in this article:

<URL:http://dotnet.mvps.org/dotnet/code/forms/#NoClose>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>