Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my icon not appear in the title bar?

Tags:

c#

.net

winforms

I have assigned an icon to my application from the Properties window in Solution Explorer in Visual Studio; the application's icon changed successfully but the title bar is still showing the default icon:

The title bar, showing the default icon

I've rebuilt my application but it still displays the default icon. What am I doing wrong?

like image 373
Rafik Bari Avatar asked Jan 27 '13 13:01

Rafik Bari


3 Answers

Because forms have a different icaon configuration than the application. Set the icon on the form, not ONLY on the application.

like image 170
TomTom Avatar answered Oct 14 '22 07:10

TomTom


There is another reason why the icon might not show.

If the ControlBox property of the Form is set to False the icon will not show.

(Sounds like an undesired side effect)

like image 6
Robert Wilkinson Avatar answered Oct 14 '22 07:10

Robert Wilkinson


I know that it is a very old issue but I can add the following comment :

Pay attention to the 'FormBorderStyle' property. If 'FixedToolWindow' or 'SizableToolWindow' are selected, your icon will not appear, even if you specified an icon in the 'Icon' property. I encountered the same issue. Good luck.

like image 5
Matth2t1h Avatar answered Oct 14 '22 06:10

Matth2t1h