Click here to Skip to main content
15,311,717 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
I am trying to make a desktop application here. What i want to achieve is to hide the title bar of ma windows application.

Obviously having n application on desktop all the time with title/caption bar wont look good.

I googled it. But could only find a method to hide the control box on the title bar.
this.ControlBox = false;


but didnt find ny way to hide the whole title bar. no probs if i loose the functionality to resize the window. But i just dont want the title bar in ma app.

Thanks in advance.
Posted

Form title bar hides when FormBorderStyle property set as None
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
   
v2
Comments
Rahul_Patel 21-May-11 10:03am
   
a 5 frm me...
thanks a lot sir...
   
It really works! My 5.
--SA
Setting
ControlBox = false
is not enough: Try:
ControlBox = false;
Text = "";
But be aware that the user needs to know how to close, or at least minimize your app!
   
Comments
Rahul_Patel 21-May-11 10:02am
   
a 5 frm me.....
thanks a lot....
   
Surprisingly, it works, too (I thought only this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None will work). My 5.

Two notes:
1) Use string.Empty, not "";
2) How to close is not a problem, it won't disable Alt+F4, yes some visual way of closing may be needed.
--SA
OriginalGriff 22-May-11 3:51am
   
A heck of a lot of users have never used a keyboard shortcut for anything! :laugh:
Sergey Alexandrovich Kryukov 22-May-11 13:42pm
   
I noticed that pitiful fact. I mentioned that visual feedback is important, as well as your last-sentence note above.
--SA

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