Picture Box Image setting Help

Hi I am trying to set an image on button click for a picture box. I can get it to work by typing the file location in the code. However I need to set the file name from a string variable. When I do, I get this error:

"error C2665:'System::Drawing::Image::FromFile' : none of the 2 overloads could not convert all the argument types"

This is my code:

 
PictureBox1->Image = Image::FromFile(PictureName);



Hope Someone can help,

Thanks
What type is PictureName
The variable type is a string.
Topic archived. No new replies allowed.