I have a program in C# with a PictureBox object inside a Form. How do I change its picture? The pictures to chose from are in bin/Pics; they are jpeg in format, if that matters..
I have a program in C# with a PictureBox object inside a Form .
Share
Assign a new
Imageobject to yourPictureBox‘sImageproperty. To load anImagefrom a file, you may use theImage.FromFilemethod. In your particular case, assuming the current directory is one underbin, this should load the imagebin/Pics/image1.jpg, for example:Additionally, if these images are static and to be used only as resources in your application, resources would be a much better fit than files.