更改图像时,C#图片框位置会发生变化

时间:2011-01-30 17:26:55

标签: c# location picturebox

我有一个PictureBox,当我因某种原因更改图片时,PictureBox的位置无法正确显示。它显示在左下角而不是左上角。

如果我检查顶部,左侧,位置等的值,那么这一切都是正确的。有什么我忘记了吗?

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

1 个答案:

答案 0 :(得分:2)

我认为这是因为SizeMode属性设置为AutoSize,请尝试将其设置为Normal

祝你好运!

相关问题