Winforms console application, how can I insert an icon into an exe file?

I have a console application, I want to include the ico file as an embedded resource in the exe and then use it as a program icon in windows explorer, how is this done?

+2


source to share


3 answers


If you right click on your actual project to change the final icon and select properties from the popup menu, then the main screen changes to edit the properties file on the screen that appears in the botton, you will see that you can select the icon to be used in the application. select it and when you compile your project, in the release type you will see that the application has the icon you selected.



Sincerely.

+5


source


On the project settings page for the Console application, go to the application page.

Under Icon and Manifest, click the [...] button next to where it says (default icon) and select an icon. Rebuild your application.



This will give your console app a custom icon.

+1


source


The icon displayed in Windows Explorer for any .net application is a build icon that can be set in the project settings in visual studio.

+1


source







All Articles