How to prevent changing picturebox's size when changing size of the control that contains the picturebox?
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.
精彩评论