开发者

How to prevent changing picturebox's size when changing size of the control that contains the picturebox?

开发者 https://www.devze.com 2023-02-03 01:53 出处:网络
I have a user control with picturebox on it. I want the picturebox size to remain the same, but the form that contains the user control changes the hight of the control and the picturebox\'s height ch

I have a user control with picturebox on it. I want the picturebox size to remain the same, but the form that contains the user control changes the hight of the control and the picturebox's height chan开发者_如何学运维ges. Can I somehow keep the height (and width) constant?


If the picture box is docked or has anchors set, it "follows" the parent's height (and width, if the correct anchor/docking is configured).

Please check whether you set the Dock and Anchor properties correctly. See also this tutorial.

0

精彩评论

暂无评论...
验证码 换一张
取 消