Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void CreatePictureGrid(int xRow, int yRow, int imagesize)
- {
- PictureBoxList = new List<PictureBox>();
- int imagecount = 0;
- for (int y = 0; y < yRow; y++)
- {
- for (int x = 0; x < xRow; x++)
- {
- int xLoc = imagesize * x;
- int yLoc = imagesize * y;
- PictureBox pbTemp = new PictureBox();
- //PB Settings
- pbTemp.SizeMode = PictureBoxSizeMode.Zoom;
- pbTemp.Image = CreateCountImage(imagecount.ToString(), imagesize, imagesize);
- pbTemp.Width = imagesize;
- pbTemp.Height = imagesize;
- pbTemp.Location = new Point(xLoc, yLoc);
- PictureBoxList.Add(pbTemp);
- this.pImageContainer.Controls.Add(pbTemp);
- imagecount++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement