When I'm trying to set a position for a user control that contains a PictureBox and an ImageList, only part of the image is visible!? What is wrong? For the location, I guess pixel is what I can use?
pictureBox1.Location = new Point(10, 20);
pictureBox1.Image = imageList1.Images[3];
Then I also wonder how I can create several user controls, like the one I describe above, during runtime, like some kind of dynamic creation!? I want to set different images and location for each user control. This creation should take place inside another user control and that contains a big panel. I'm not sure how i should do this and how I can communicate between the two user controls? Just like passing values to methods and constructors af these user controls?!
Preciate some help to solve this! Thanks!
EDIT: I'm trying this code right now, but I cant find the reason why it isn't working?
pictureBox1.Size = new System.Drawing.Size(79, 91);
pictureBox1.Location = new Point(10,10);
pictureBox1.Image = imageList1.Images[3];
I still get only parts of the image. And it's strange why the code below works and show 100% of the image?
pictureBox1.Image = imageList1.Images[2];