111,094
社区成员




this._splitPictureBoxes = new PictureBox[this.ImgNumbers * this.ImgNumbers];
for (int i = 0; i < this.ImgNumbers; i++)
{
for (int j = 0; j < this.ImgNumbers; j++)
{
PictureBox pic = new PictureBox();
pic.Location = new Point(j * this.SideLength, i * this.SideLength);
pic.Size = new Size(this.SideLength, this.SideLength);
pic.Visible = true;
pic.BorderStyle = BorderStyle.FixedSingle;
pic.MouseDown += new MouseEventHandler(this.pictureBox_MouseDown);
this.pnl_Random.Controls.Add(pic);
this._splitPictureBoxes[j + i * this.ImgNumbers] = pic;//图片切割后按从左到右,从上到下的顺序放入一维数组
}
}
类似这样的代码