Loading PictureBox Image from resource file with path (Part 3)

前端 未结 5 899
北荒
北荒 2020-12-03 07:19

I understand that this question has been asked (and answered) before. However, none of the solutions are working for me.

Below is a screen capture of all the relevan

5条回答
  •  无人及你
    2020-12-03 07:47

    The path should be something like: "Images\a.bmp". (Note the lack of a leading slash, and the slashes being back slashes.)

    And then:

    pictureBox1.Image = Image.FromFile(@"Images\a.bmp");
    

    I just tried it to make sure, and it works. This is besides the other answer that you got - to "copy always".

提交回复
热议问题