Sam

Sam

  • NA
  • 1
  • 0

change Resources bitmap using string

Jun 26 2006 9:39 AM
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!

Answers (1)