Method One
Picturebox1.backgroundimage = Image.FromFile (@ "Resources\bg.gif");
Or
Picturebox1.backgroundimage = new System.Drawing.Bitmap (@ "Resources\bg.gif");
Note: The resources folder must be placed under the Bin\Debug folder, otherwise you will not be prompted to find the picture
Method Two
First, in the root directory, create a new folder named Resources, put the picture in the folder, and then double-click on the Resources.resx, in the upper left corner of the "Add resources"---> "Add Existing Files", select the new Resources folder of the picture
Picturebox1.backgroundimage = Properties.Resources.bg2;
Method Three
Use the Imglist control to add a picture to the images property of Imglist
Picturebox1.backgroundimage= Imgfirst.images[0];
The disadvantage of using this method is that you cannot find the picture by the name of the picture, only the digital ID, and once the previous picture is deleted in the imglist, the order of the subsequent pictures will change.