Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to Complete remove the Exit button from the title bar in windows form in C#



Any Suggestion
Posted
Comments
Akinmade Bond 3-Nov-12 12:47pm    
Take a look at the ControlBox property of form in design view and set it to false.

 
Share this answer
 
v3
Setting FormBorderStyle = "none" will remove the title bar (at both design and run time) - and also remove your ability to resize the form.

If you need a border you can set:

C#
ControlBox = "false";
Text = "";

And if you want to disable the close button then try this:
Disable An Applications Close Button[^]


     --Amit
 
Share this answer
 
v2
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.controlbox.aspx[^]

c3
public void CreateMyBorderlessWindow()
 {
    this.FormBorderStyle = FormBorderStyle.None;
    this.MaximizeBox = false;
    this.MinimizeBox = false;
    this.StartPosition = FormStartPosition.CenterScreen;
    // Remove the control box so the form will only display client area.
    this.ControlBox = false;
 }
 
Share this answer
 
There is no such button on a title bar. There is nothing to remove.

—SA
 
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