Click here to Skip to main content
15,850,265 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using visual c# 2013 ultimate. My project has several image that i assigned to picture box and don't have any problem with this. But now, when i want to add new picturebox,i can't assign new image to it.Whereas it was not before. Design mode don't have a problem and image is properly assigned to picture box. But in running mode,new picturebox don't have any image and show empty picturebox , just show bgcolor. But other picturebox don't have any problem. What is wrong?
"in this code 300720131281 is a valid jpg"

C#
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;


actually, image that build with the following code in 'resources.rex' is returned null ! why??


C#
internal static System.Drawing.Bitmap _300720131281 {
           get {
               object obj = ResourceManager.GetObject("300720131281", resourceCulture);
               return ((System.Drawing.Bitmap)(obj));
           }
       }
Posted
Updated 5-Mar-15 11:24am
v2

1 solution

What is these " in the value of the Name property?
It seems like it comes from HTML.
Anyway, if you could send more code, or an entire test project, it may help me to help you:-)
 
Share this answer
 
Comments
Member 9653040 5-Mar-15 16:25pm    
fixed

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900