Reputation: 22486
A client has asked me to remove the icon from the form's title bar. As they don't want to display any icon. But this me guessing as when I click on the icon property you have to browse to some icon.
Upvotes: 30
Views: 44007
Reputation: 617
Icon > False
This COULD be a good approach, but these are good too:
this.Icon = null;
//Or
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
//Or
Select Your Form -> Right-Click -> Properties -> Icon -> Select file
That's all I have for this, I hope this helps you.
Upvotes: 1
Reputation: 62
There appears to be an updated process. Following the steps in the selected answer doesn't direct me to an option to upload an icon. That option can be found on Microsoft's site: https://support.office.com/en-us/article/add-a-custom-title-or-icon-to-a-database-0e43e135-dd0d-4451-84ea-4f547e14480e
Upvotes: 2
Reputation: 3754
There are two ways.
First is to create an empty Icon file and then Select Form -> Right Click -> Goto Properties -> Goto Icon -> Select your file.
The other approach is to set FormBorderStyle of the form to FormBorderStyle.SizableToolWindow or FormBorderStyle.FixedToolWind
And one more way is to set ShowIcon property to be false.
Upvotes: 11
Reputation: 5488
Set ShowIcon Property of the form to False to see if that's what your client wants.
Upvotes: 77
Reputation: 158289
You can set ControlBox = false. However, that will remove not only the icon but also maximize and minimize buttons from the title bar.
Upvotes: 2
Reputation: 16077
Set
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Upvotes: 4