Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

making exe files that contains pictures and other files

I have a program that made with c# and it has include more pictures and files.

And how I make an exe that include all of images and files.

like image 923
Sahan Chinthaka Avatar asked Dec 04 '25 18:12

Sahan Chinthaka


1 Answers

You can use Application Resources in visual studio.

  1. Right click on Project (Solution Explorer) and Go to Properties

  2. Select Resources tab

  3. Add what you want (Images, Files, Strings etc.)

You can access them in your code as per below

Properties.Resources.<Resource Name>

If you added image img1 to Resources

you can use below code to use it

pictureBox1.Image = Properties.Resources.img1;
like image 165
Shalitha Suranga Avatar answered Dec 09 '25 22:12

Shalitha Suranga



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!