TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jonathan Cox
NA
8
0
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.
Reply
Answers (
0
)
multiplexing
Simple Regex Problem