exeself-extracting

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.


Solution

  • 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;