Could anyone tell me how to implement a 2-d array of picture box?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanju sathyapalan
    New Member
    • Sep 2010
    • 1

    Could anyone tell me how to implement a 2-d array of picture box?

    InitializeCompo nent();
    pictureBox = new PictureBox[8][];

    for (int i = 0; i < 8; i++)

    {
    for(int j=0;j<8;j++)
    {
    pictureBox[i][j] = new PictureBox();
    pictureBox[i][j].Left = i * 70;
    pictureBox[i][j].Top = 10;
    pictureBox[i][j].Width = 60;
    pictureBox[i][j].Height = 60;
    pictureBox[i][j].BackColor = Color.Black;
    this.Controls.A dd(pictureBox[i][j]);
    }
    }
Working...