Revvion
Revvion

Reputation: 635

C# picturebox location changes when changing image

I have a PictureBox and when I change the image for some reason the location of the PictureBox isn't displayed correctly. It is displayed in the lower left corner instead of the top left.

If I check the values of top, left, location etc. it is all correct. Is there something I am forgetting?

 myPictureBox.Image = image;
 myPictureBox.Location = new Point(0,0);

Upvotes: 2

Views: 10596

Answers (1)

Homam
Homam

Reputation: 23841

I think that's because the SizeMode property is set to AutoSize, try to set it to Normal.

Good luck!

Upvotes: 2

Related Questions