hi, I need to load multiple image in a window, the problem is when I'm loading so many images, lets say about 500 or more images it throws out of memory exception, another problem is the height property of the control is only limited to about 32,000, when I try to add many pictureBox it does not fit in the panel control and some pictureBox are not display, here's my codes ..
private void Form1_Load(object sender, EventArgs e)
string imageDirectory = @"c
string imageFileList = Directory.GetFiles(imageDirectory);
int iCtr = 0;
foreach (string imageFile in imageFileList)
PictureBox eachPictureBox = new PictureBox();
eachPictureBox.Size = new Size(850, 1100);
eachPictureBox.Location = new Point(1, iCtr * 1100 + 1);
eachPictureBox.Image = Image.FromFile(imageFile);
I try to load it when the window form loads, any tips will be much appreciated, thanks ..
0 · ·