Reputation: 5615
I don't know if I asked it right, but basically what happened is that I made a winform app which loads its image from the resource folder.
The problem is that when I build the project and get the exe and give it to a friend, he won't have that resource folder like I do, so he'll get an error saying missing file.
How can I somehow mix, or combine, or attach the image with my app?
Upvotes: 32
Views: 45226
Reputation: 1520
If you don't need to update it in the future, compile your program with the Image property Build Action set to Embedded Resource. If you need to change it in the future, compile with property Build Action set to Content.
Upvotes: 5
Reputation: 10390
You need to add it to the project by navigating to the Properties Window and going to the resource tab and adding the image from there.
Alternatively, from the PictureBox Control you can import resource from your computer.
Upvotes: 36