Icon for title

Hello guys. Does exist any way to set own icon for button in task panel
http://joxi.ru/4AkvxM1SyJaqY2

Right-click on project in Visual Studio >>> Properties >>>
on tab Application … Resoucces … Icon

more…

Ha ha, I use Linux OS. Forget about visual studio!

Ha ha, then forget about task panel icon? I am sure there is a way and it might help to mention what dev environment you are using.

I use monodevelop. And if you opened my link then you must understand what task panel I speak about.

Read up the GitHub link.

Harry, I’ve created simple console application and added reference to monogame manually and written code manually. Where must resource file appear? Or you don’t understand me or I am fool.

Sure… Everyone knows by heart the look of all tasks bars of all possible OS.
Dont forget to mention all the information about your problem or you will end up waiting for usefull answers
Maybe you will need to install the icon into the icon theme, and install an app shortcut ( *.desktop file) that references the icon by name
Or
http://www.monodevelop.com/developers/articles/project-templates/

Add .bmp file for your icon to the project, under its properties set build action to embeded resource, and set its resource id to “Icon.bmp”.

2 Likes

Hm, I will try now but… bmp does not support alpha channel. I’ve just tried and nothing changed. I don’t know what size of source image, 16, 24 or 32 bit save via Gimp image editor are necessarry

You can have an alpha channel in bmp images. In GIMP, when you export as .bmp under ‘Advanced Options’ you can enable exporting the alpha channel (only when your image has an alpha channel).

What desktop environment (or what task bar in case it’s a DE without a task bar included) are you using? Is it Cinnamon? I think if you want your icon in the task bar, you need to launch it with a launcher through a .desktop file that references the icon, but I’m not sure because I can’t seem to find how the task bar icon is chosen on Linux (I don’t think it’s standardized). Probably people on your DE’s forum/RFC channel can help out better.

I use KDE desktop environment. And I run application from debugger monodevelop, Nothing .desktop files, I will run application on Open Box (with LX panel) DE using command prompt mono myApp.exe. I want to see my icon when I will switch between applications via ALT + TAB

I am judging you so hard now @Jjagg O o, so much incorrect Linux info in a single block…

1 Like

Then correct me…

Not important info, all DEs that have a taskbar act the same for selecting icon.

Incorrect, all .desktop files allow is overriding of app icon, you can still replace your app icon in case the software is launched without using a desktop file.

It’s standardized.

They would be of no help, what he is trying to do is related to MG, not Linux.

Add .bmp file for your icon to the project, under its properties set build action to embeded resource, and set its resource id to “Icon.bmp”.

Can’t get it to work, where do you find “resource id”?

Hi, I know this thread is a little old, but I am still having problems with the Monogame icon overriding my custom .bmp file in my Windows taskbar.

I have replaced both .ico and .bmp files with my custom icon and made sure they retained their Icon.ico and Icon.bmp names, have the original dimensions, and are both still embedded resources. My custom icon shows for the .exe file, but when the game launches, the Monogame icon shows in the taskbar. I have tried clearing my system’s thumbnail cache but to no avail.

I have a feeling that this error is showing because I am trying to port my XNA game from another project. I have created a new Monogame project and linked my old project files over as a copy. The XNA game is running fine with the correct custom icons on Visual Studios 2010 using Microsoft .NET Framework 4.0.

For the new Monogame project, I am using the public release for MonoGame v3.6 with Microsoft Visual Studios 2012 on Windows 7 so that it can support Microsoft .NET Framework 4.5.

Is this error showing because the startup object is still tied to my old XNA .Program file? If so, how would you recommend I go about fixing this? Thank you for any help.

I’m having the same issue. I can only get the .exe icon to change, but not the taskbar one.

I’ve tried 2 different ways:

  1. Go to the project properties, Icon and Manifest, click on Browse and select the new icon. This does not work, it says there is already an icon. This is what some guy does on this video, and works for him: https://www.youtube.com/watch?v=vycW81vWMmo
  2. What @harry-cpp describes, replacing both the .ico and .bmp files, and making sure Embeded resource is selected. This makes the .exe (which comes from .ico for what’s been explained) change, but not the taskbar icon.

I’ve tried to clean the thumbnails on the Disk Cleanup application, but still the same problem.

This is on Windows 10, MonoGame 3.7.1

Tried on a computer with Windows 7, and same problem, so I doubt it’s got anything to do with Windows caching thumbnails.

Also, there is a funny behaviour: if I pin the app to the taskbar, the icon changes and displays the right one. When I unpin it, it shows the MonoGame icon again. The icon displayed on the window, next to the title, is always the MonoGame one though.

I just double checked that my icons have the original size of both the .bmp (256x256) and .ico (128x128).

I’m not sure what else to try.

After sleeping on it, I’ve just tried this:

It’s not enough to set the icons to embedded, as mentioned above. You also need to add LogicalName tags like this on the .csproj file:

<EmbeddedResource Include="Icon.bmp">
  <LogicalName>Icon.bmp</LogicalName>
</EmbeddedResource>

Same thing for the Icon.ico, although that was working previously, but added it anyway.

Now I have my custom icon on the window (form) bar and on the task bar.

8 Likes