Archived

This topic is now archived and is closed to further replies.

Winforms icon frustration...

This topic is 5024 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In my C# programs, I like to assign all sorts of colorful icons to things like buttons and linklabels (through the standard IDE at design time). However, if I zip up my project folder and install it on another machine, it can''t find the icons! I used to use VB 6 a lot, and I don''t remember ever having this problem, so it must have been compiling all the image resources into a resource file in the background. C# seems to instead maintain references to the images instead of packaging them with the exe. This is incredibly frustrating! Why does it work this way? I mean, what are the odds that all the people you distribute to are going to have the same icon files in the same place on their machine? How can I fix this problem? If I put all the image files in the project folder, are the tools smart enough to find them there? Or do I have to do some kind of tedious process that involves adding the image files to the manifest and then use some hideous function to get them back out again? Really all I want to do is a design a form in the IDE and have it display like that on all machines. You know, like VB has done since the dawn of time. Is that too much to ask? ---------------------------------------- Let be be finale of seem, seems to me. ---------------------------------------- Shedletsky''s Code Library: Open source projects and demos

Share this post


Link to post
Share on other sites
You can embed a resource into the executable by adding the file to the project and changing the Build Action in the Properties section below the Solution Explorer to Embedded Resource.

Magius

Share this post


Link to post
Share on other sites