title: How to resize picutureboxes in a for loop
body: <p>I needed help resizing pictureboxes in a for loop
  i dont want to resize picturebox1, then resize picturebox2 etc </p>
  
  <pre><code>Sub MakePiece()
      Dim PieceHeight, PieceWidth As Integer
      Dim PuzzleImage As New Bitmap(ChosenFilename)
      ' dividing the dimensions by 18
      PieceHeight = PuzzleImage.Height / 18
      PieceWidth = PuzzleImage.Width / 18
      ' resizing the puzzlepieces1-9 and refreshing
      For index = 1 To 9
          PictureBoxPuzzlePiece(index).Width = PieceWidth
          PictureBoxPuzzlePiece(index).height = PieceHeight
      Next
      Me.Refresh()
  End Sub
  </code></pre>
  
  <p>All pictureboxes 1-9 get resized</p>