Ok so i used the code kebo gave me earlier when using tablelayout pannels, but the computer i'm using is really slow and it ended up being really glitchy. I tried using the same code only modified except using two 2D arrays and pictureboxes, but it doesn't work. I see what my problem is, but don't quite understand how to fix it. Any help? Thanks!
Code:
Select Case rotation Mod 4
Case 0
'no rotation
For i As Integer = 0 To 10
For j As Integer = 0 To 10
rotatearray(i, j) = array(i, j)
Next
Next
Case 1
'rotate right 90
For i As Integer = 0 To 10
For j As Integer = 10 To 0 Step -1
rotatearray(i, j) = array(i, j)
Next
Next
Case 2
'rotate right 90
For i As Integer = 10 To 0 Step -1
For j As Integer = 10 To 0 Step -1
rotatearray(i, j) = array(i, j)
Next
Next
Case 3
'rotate right 270
For i As Integer = 10 To 0 Step -1
For j As Integer = 0 To 10
rotatearray(i, j) = array(i, j)
Next
Next
End Select
For x As Integer = 0 To 10
For y As Integer = 0 To 10
array(x, y) = rotatearray(x, y)
array(x, y).BringToFront()
Me.Controls.Add(array(x, y))
Next
Next