views:

1755

answers:

4

Hello,

C# 2005.

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.

Many thanks,

+1  A: 

Set

FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog

Ramesh Soni
+4  A: 

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

Stanislav Kniazev
+2  A: 

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.

yinyueyouge
+1  A: 

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