How create picture boxes runtime according to no. of pictures in a folder?
-
how i create no. of pictures boxes during runtime. The no. of picture boxes is equal to the no. of images in a folder. Thanks
-
how i create no. of pictures boxes during runtime. The no. of picture boxes is equal to the no. of images in a folder. Thanks
use IO namespace to get the folder and file info loop through the files in the folder counting/creating a picturebox for each one
Never underestimate the power of human stupidity RAH
-
how i create no. of pictures boxes during runtime. The no. of picture boxes is equal to the no. of images in a folder. Thanks
do following steps : 1. list files in your selected directory using
System.IO.Directory.GetFiles(PathToYourImageDirectory);
2. iterate along list of files in step no 1 3. Create a PictureBox ie :PictureBox pb = new PictureBox();
4. Set your picture box property in step no 3, like Top, Left, Widht and Height. 5. Add your picture box to your form or other container control you use, withyourParentControl.Controls.Add(pb)
6. Load your image to picture box usingpb.Image = Image.FromFile(TheFileFromList)
7. Repeat step no 3 until all files processed. hope this helpsdhaim ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro" in the front line gave a lead, in the middle line build goodwill, in the behind give power support
-
do following steps : 1. list files in your selected directory using
System.IO.Directory.GetFiles(PathToYourImageDirectory);
2. iterate along list of files in step no 1 3. Create a PictureBox ie :PictureBox pb = new PictureBox();
4. Set your picture box property in step no 3, like Top, Left, Widht and Height. 5. Add your picture box to your form or other container control you use, withyourParentControl.Controls.Add(pb)
6. Load your image to picture box usingpb.Image = Image.FromFile(TheFileFromList)
7. Repeat step no 3 until all files processed. hope this helpsdhaim ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro" in the front line gave a lead, in the middle line build goodwill, in the behind give power support
Thanx A lot....... :)