Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to attach a resource (an image for example) with the exe file?

Tags:

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?

like image 975
vexe Avatar asked Jul 18 '12 21:07

vexe


People also ask

How to add image in resources c# windows application?

Right-click on the Picture box, go to Properties. Select the "Image" property and select the "Import" option. You will get browse for adding image files, now select any 3 nose pictures. (In this project I have added 3 nose Button Controls so we need only 3 nose images also, you can add fewer or more as you desire.)

How do I add an image to a resource in Visual Studio?

In Visual Studio, open a SharePoint solution. In Solution Explorer, choose a SharePoint project node, and then, on the menu bar, choose Project > Add New Item. In the Add New Item dialog box, choose the Global Resources File template, and then choose the Add button.

How do I add resources to winform?

On the Tools menu, click Resource Files. In the Resource Files dialog box, click Add. In the Add File dialog box, select the file that you updated, and then click OK.


1 Answers

App Properties Window

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.

Option 2

like image 156
Glenn Ferrie Avatar answered Sep 19 '22 17:09

Glenn Ferrie