29

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.

Patrick McElhaney
  • 57,901
  • 40
  • 134
  • 167
ant2009
  • 27,094
  • 154
  • 411
  • 609

7 Answers7

75

Set ShowIcon Property of the form to False to see if that's what your client wants.

Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
Stanislav Kniazev
  • 5,386
  • 3
  • 35
  • 44
10

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.

Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
yinyueyouge
  • 3,684
  • 4
  • 25
  • 22
4

Set

FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog

Ramesh Soni
  • 15,867
  • 28
  • 93
  • 113
2

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

tmsdajpa
  • 62
  • 1
  • 8
2

You can also try this:

this.Icon = null;
Aqeel
  • 804
  • 1
  • 11
  • 15
2

You can set ControlBox = false. However, that will remove not only the icon but also maximize and minimize buttons from the title bar.

Fredrik Mörk
  • 155,851
  • 29
  • 291
  • 343
1
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.

Momoro
  • 599
  • 4
  • 23