Sahan Chinthaka
Sahan Chinthaka

Reputation: 150

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.

Upvotes: 3

Views: 560

Answers (1)

Shalitha Suranga
Shalitha Suranga

Reputation: 1146

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;

Upvotes: 1

Related Questions