hey guys, I am trying to change a PictureBox's image...
This stuff works:
m_CardImg = new PictureBox();
m_CardImg.Image = cardGame.Properties.Resources.b1fv;
This stuff does not work:
string newImageLink = "b1fv";
m_CardImg = new PictureBox();
m_CardImg.Image = cardGame.Properties.Resources + newImageLink;
I am trying to change the Resources bitmap image called b1fv using a variable called newImageLink (which contains a string version of it).
Thank you in advance for your help!
Change Resources bitmap using string
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Krishnaraj L153 reputationPosted Jun 29, 2006, 4:28 AM EDT
Please try this code. it should work.
This stuff does not work:
string newImageLink = "give a file name here";
//m_CardImg = new PictureBox(); -- No need to allocate it again
//m_CardImg.Image = cardGame.Properties.Resources + newImageLink; -- Your code
m_CardImg.Image = Image.FromFile ("
Hope this helps.
Regards,
Krishnaraj