|
-
April 30th, 2012, 09:15 AM
#1
Hi, noob question
Thank you in advance,
My problem with the code is that i want to swap p1 which is a picturebox for a different picture box as it loops. I have 100 pictureboxes that i need to loop throughm but i can't figure out how to swap p1 for p2 and so on..
Code:
public Form1()
{
InitializeComponent();
int row = 0, column = 0; // used for 2d array
for (int count = 1; count < 101; count++)
{
boxes[row, column] = p1;
if (column == 10)
{
row++;
column = 0;
}
}
}
PictureBox[,] boxes = new PictureBox[10,10];
Last edited by DataMiser; April 30th, 2012 at 04:54 PM.
Reason: added code tags
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|