Click here to Skip to main content
15,894,284 members
Please Sign up or sign in to vote.
2.20/5 (3 votes)
See more:
C#
//////////////////////////////////////////////////// 
 pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
 pictureBox1.ImageLocation = Application.StartupPath + "\\pic\\schemaCar.png";
////////////////////////////////////////////////////
 PictureBox picture1 = new PictureBox();
 picture1.SizeMode = PictureBoxSizeMode.StretchImage;
 picture1.Image = new Bitmap(Application.StartupPath + "\\pic\\" + action + ".jpg");
 picture1.Location = new System.Drawing.Point(115, 75);
 picture1.Size = new System.Drawing.Size(17, 60);
 pictureBox1.Controls.Add(picture1);
///////////////////////////////////////////////////
 PictureBox picture2 = new PictureBox();
 picture2.SizeMode = PictureBoxSizeMode.StretchImage;
 picture2.Image = new Bitmap(Application.StartupPath + "\\pic\\" + action + ".jpg");
 picture2.Location = new System.Drawing.Point(82, 75);
 picture2.Size = new System.Drawing.Size(17, 60);
 pictureBox1.Controls.Add(picture2);
 //////////////////////////////////////////////////
 PictureBox picture3 = new PictureBox();
 picture3.SizeMode = PictureBoxSizeMode.StretchImage;
 picture3.Image = new Bitmap(Application.StartupPath + "\\pic\\" + action + ".jpg");
 picture3.Location = new System.Drawing.Point(242, 75);
 picture3.Size = new System.Drawing.Size(17, 59);
 pictureBox1.Controls.Add(picture3);
//////////////////////////////////////////////////
 pictureBox1.Image.Save(@"C:\New folder\picture.jpg");
/////////////////////////////////////////////////

this code just save first image in picturebox, but i need merge all images and save it......
above cod: show all images in picturebox1, but i can't save all images in one picture to memory
Posted
Updated 14-Sep-14 9:38am
v2
Comments
Afzaal Ahmad Zeeshan 14-Sep-14 15:39pm    
This question in not understandable, and would not return any positive answers to your post. You should consider adding some more details to your question.

Even though the question is not clear, it clearly indicates that you should not use PictireBox at all. Please see my past answers:
Append a picture within picturebox[^],
draw a rectangle in C#[^],
How do I clear a panel from old drawing[^].

See also:
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
capture the drawing on a panel[^],
Drawing Lines between mdi child forms[^].

—SA
 
Share this answer
 
Did you learn anything from my answer to your first question:

How Do I Save One Image Of All Picturebox Controls Which Added In My Pictrebox?

I think Sergey is right: this is one case you should not try and work with the PictureBox Control; please review Sergey's answer(s), and the links he provided.

A "PictureBox" Control is a container for one image. That image should be assigned to the PictureBox using the 'Image property of the PictureBox, or the ImageLocation property.

The fact you can add Controls to the PictureBox's ControlCollection ... a facility PictureBox inherits since its ancestor is the Control Class ... does not mean you should use it to host multiple other PictureBoxes ... or any other Control.

Use a Panel, or other ContainerControl Control, which allows multiple PictureBoxes, or other Controls, to be added to its ControlsCollection.

Before posting your next question, please do search CodeProject for articles on images, and image manipulation: there are many excellent resources here.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900