You've alreay got the code. Put your PictureBoxes into an array or collection and randomise it as you have alreay been shown. You can then use a loop to place your randomised cards into the randomised PictureBoxes.