简体   繁体   中英

C# Visual Studio 2010 embed exe icon

I have made an anplication with Visual Studio C# 2010 Express, and I have set my icon in the project properties -> application -> ressources ...

like this

but when I try to launch my app, I need to copy my icon in the same folder of the application

How can I embed it ?

What you've done is to add a pointer to a file on disk; instead, it's probably simpler to link the icon directly into your executable as a resource.

This page shows how to add an Icon resource to your .NET application: http://msdn.microsoft.com/en-us/library/7k989cfy(v=vs.80).aspx

Once you've done this, you can point to the application icon that is compiled into your program, and it won't have to live on disk in a separate file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM