in C# winform, how to attach a resource (an image for example) with the exe file?
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?
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.
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.