在PictureBox上疊加多張圖片可以通過以下步驟實現(xiàn):
Bitmap finalImage = new Bitmap(pictureBox1.Width, pictureBox1.Height);
Graphics graphics = Graphics.FromImage(finalImage);
Bitmap image1 = new Bitmap("image1.jpg");
Bitmap image2 = new Bitmap("image2.jpg");
graphics.DrawImage(image1, new Point(0, 0));
graphics.DrawImage(image2, new Point(0, 0));
pictureBox1.Image = finalImage;
通過以上步驟,就可以在PictureBox上疊加多張圖片了。如果要添加更多的圖片,可以繼續(xù)重復(fù)步驟3和步驟4。