Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to assign Application Icon that will display in Task bar?

I am working on a Wpf desktop application, whenever i run my application it shows me a window and associated tab in the task bar(Normal windows feature). My problem is that the tab is using window's icon for unknown file-type, I tried with Icon property of Window, Icon gets assigned but still problem is when I run application, task bar Tab initially displays window's icon for unknown file-type and when window-load completes it changes to the Icon assigned. I want Icon there from beginning. Any help?

Edit:

I tried with .csproj --> Properties --> Application Tab --> Icon and set it to a .ico file. It works but I need to run my application by .exe file. It doesn't work in development environment(while running through visual studio). I need to set Start-Project option then. Is there any other way to solve this problem?

like image 564
viky Avatar asked Jun 07 '10 14:06

viky


People also ask

How do I customize apps on my taskbar?

If you want to change multiple aspects of the taskbar at one time, use Taskbar settings. Press and hold or right-click any empty space on the taskbar, and then select Taskbar settings. In the Taskbar settings, scroll to see the options for customizing, choosing icons, and much more.

How do I change the icon picture on the taskbar?

Alternatively, if you hold Shift and right-click the icon on the taskbar, you get the standard Windows Explorer context menu, instead of the application jump list. Again, click Properties. From the Properties dialog, go to the Shortcut tab and click the Change Icon button. Select a new icon file by clicking Browse.


2 Answers

Check the properties of your main Window project.. You should be able to set an icon there.

Setting an icon on your project

Update: Is it such a problem that your icon does not show in debug mode? As long as it works when you deliver the program to your customer, its all alright, not?

On a side note: You could check some things though. Perhaps your icon is not included in your project, or it isnt copied when building to your Debug folder?

Update 2: You also need to set the Main Form's Icon for it to show in Debug. If you also set the icon for the main form, it will display in the Taskbar during Debug / Runtime.

like image 140
Arcturus Avatar answered Sep 23 '22 02:09

Arcturus


I had a similar issue and google led me to this article. I forgot one simple thing, and that was my Main Form's Icon. If you also set the icon for the main form, it will display in the Taskbar during Debug / Runtime.

like image 40
RooiWillie Avatar answered Sep 24 '22 02:09

RooiWillie