Click here to Skip to main content
15,559,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to disable or disappear the exit button in the title of windows form in c#
MT_ 2-Nov-12 9:05am    
You added comment and deleted? Did it helped, If yes, mark the appropriate answer as solution/upvote.

If you set ControlBox property of the form to false, all three buttons (minimize, maximise and close) will go off.

Other way would be at the link Allan Chong provided.

And third possible way is to handle Closing event and set
e.Cancel = true;

This third way might be the best as you can warn the user before cancelling the close event and/or do logging as required and then make decision whether to let it close or not.

Share this answer
Allan Chong 2-Nov-12 7:53am    
well, if the poster still wants the maximize and minimize button, this solution isn't going to work
MT_ 2-Nov-12 8:04am    
Agree. Updated the solution.
Zain -Ul- Arifeen 3-Nov-12 0:30am    
sir I want to complete remove the exit button from the title bar in windows form.

Share this answer

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900