0

I have a little problem with my c# program. I need to change the image of a picturebox in the code, so I used

Image Sign = Image.FromFile("C:\\Users\\Thomas\\Desktop\\Pictures\\GoStraight.png");

and then

ImageBox.Image=Sign;

It does work, but if I change the file location or go to another PC, the program starts with an error message. I somehow want to link the images to my program so that the programlocation doesnt really care (like if the program is on F:, E: or C:). Could you plese tell me a way to do that? That would be Great!

Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160

0 Answers0