ImageLocation....

Nov 8 2009 8:12 PM

Ok, so I'm trying to make a blackjack game, and each time you take a new card, it is supposed to create a new picturebox and put in the image for the card.  I have an array of cards created and they have a value and the resource file that is the picture of the card.  I have an array of pictureboxes created. I tried using
CardPicture[i].Image=Card[y].Picture;
CardPicture is the array of pictureboxes. and Card is the array of cards.
i is ran off of a counter... y is the randomly chosen card number.
I assume this doesn't work because I'm trying to create it at runtime.  I'm getting an error that says ImageLocation has to be set.  Problem is from what I see, it has to be the filepath or a url.  So it seems like I need to use
CardPicture[i].ImageLocation=?
I don't know what to put here to call it from my resource file?
and what if the filepath changes if the program gets sent to a different computer?
Thanks for any help.