C# 如何将图像分配给新的picturebox

C# 如何将图像分配给新的picturebox,c#,image,picturebox,C#,Image,Picturebox,我正在使用visual c 2013 ultimate。我的项目有几个图像,我分配给图片框,没有任何问题。但现在,当我想添加新的picturebox时,我不能给它分配新的图像,而以前不是。设计模式没有问题,图像已正确分配给图片框。但在运行模式下,新的picturebox没有任何图像并显示空的picturebox,只显示bgcolor。但其他picturebox没有任何问题。怎么了? 在此代码中,300720131281是有效的jpg this.pictureBox4.Image = global

我正在使用visual c 2013 ultimate。我的项目有几个图像,我分配给图片框,没有任何问题。但现在,当我想添加新的picturebox时,我不能给它分配新的图像,而以前不是。设计模式没有问题,图像已正确分配给图片框。但在运行模式下,新的picturebox没有任何图像并显示空的picturebox,只显示bgcolor。但其他picturebox没有任何问题。怎么了? 在此代码中,300720131281是有效的jpg

this.pictureBox4.Image = global::bimeh_ok.Properties.Resources._300720131281;
    this.pictureBox4.Location = new System.Drawing.Point(36, 181);
    this.pictureBox4.Name = "pictureBox4";
    this.pictureBox4.Size = new System.Drawing.Size(100, 50);
    this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
    this.pictureBox4.TabIndex = 302;
    this.pictureBox4.TabStop = false;
实际上,使用“resources.rex”中的以下代码构建的映像返回null!为什么

internal static System.Drawing.Bitmap _300720131281 {
           get {
               object obj = ResourceManager.GetObject("300720131281", resourceCulture);
               return ((System.Drawing.Bitmap)(obj));
           }
       }
看看这里。。您还需要将图像添加到资源BTW请不要重新发布!