Winforms console application, how can I embed an icon in exe file?
I have a console application, I want to include an ico file as an embedded resource in the exe, then have it as the programs icon in开发者_如何学编程 windows explorer, how is this done?
If you right click on your actual project that you want to change the final icon and select properties at the pop-up menu, then the main screen will change to the properties file edit, in the screen that appeared, at the botton you will see that you can select the icon to use in the application, select it and when you compile your project, at the release type you will see that the application have the icon that you selected.
Regards.
In the project settings page for your Console Application, go to the Application Page.
Under "Icon and Manifest", click on the [...] button next to where it says (Default Icon), and pick your Icon. Rebuild your app.
This will give your console application a custom icon.
The icon displayed in windows explorer for any .net application is the assembly icon which can be set in the project settings in visual studio.
精彩评论