Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default icon

I'm trying to change the application icon from default to something else. So what I did, is I made an icon and saved it. Then I went to the application tab in the property of my project and changed the icon. There he shows the icon like I made it, but when I run my project it shows a gray icon instead of showing my icon.

What i'm doing wrong here?

like image 806
jorne Avatar asked Apr 19 '12 07:04

jorne


People also ask

How do I change the default icons in Windows 10?

Select Start , open Settings , then under Personalization , select Themes . Under Themes, scroll down and select Desktop icon settings. Choose the icons you would like to have on your desktop, then select Apply and OK.

Can I change the icon for this PC?

To change the icon picture: Right-click the icon and click Properties. Click the Shortcut tab (if one is available), and then click Change Icon. Click the icon that you want to use from the list, click OK, and then click OK.

How do I change the default folder icon in Windows 11?

Right-click the folder and select Properties. Go into the Customize tab at the top of the window, and then choose Change Icon from the bottom. Scroll through the list to find an icon to use. Choose OK on a selection when you've decided.

Where do I find default icons?

Most Icons Windows 10 uses are actually located in C:\Windows\System32... Plus a few in C:\Windows\System32\imagesp1. dll and C:\Windows\System32\filemgmt.


2 Answers

Run it not through Visual Studio - then the icon should look just fine.

I believe it is because when you debug, Visual Studio runs <yourapp>.vshost.exe and not your application. The .vshost.exe file doesn't use your icon.

Ultimately, what you have done is correct.

  1. Go to the Project properties
  2. under Application tab change the default icon to your own
  3. Build the project
  4. Locate the .exe file in your favorite file explorer.

There, the icon should look fine. If you run it by clicking that .exe the icon should be correct in the application as well.

like image 83
default Avatar answered Sep 19 '22 21:09

default


The Icon property for a project specifies the icon file (.ico) that will be displayed for the compiled application in Windows Explorer and in the Windows taskbar.

The Icon property can be accessed in the Application pane of the Project Designer; it contains a list of icons that have been added to a project either as resources or as content files.

To specify an application icon

  1. With a project selected in Solution Explorer, on the Project menu click Properties.
  2. Select the Application pane.
  3. Select an icon (.ico) file from the Icon drop-down list.

To specify an application icon and add it to your project

  1. With a project selected in Solution Explorer, on the Project menu, click Properties.
  2. Select the Application pane.
  3. Select Browse from the Icon drop-down list and browse to the location of the icon file that you want.

The icon file is added to your project as a content file and can be seen on top left corner.

And if you want to show separate icons for every form you have to go to each form's properties, select icon attribute and browse for an icon you want.

Here's MSDN link for the same purpose...

Hope this helps.

like image 35
AlphaMale Avatar answered Sep 21 '22 21:09

AlphaMale