How to resize Form and a button but keep the button square
08:45 28 Jun 2026

I have a form with a button which has a background image 98*98. As the height of the form increases I want the buttons height to increase as well but I want the button to remain a square to keep the image aspect ratio. If the form's width is resized I don't want the button's size to change.

I have been experimenting using Panels, Anchor, Dock and Autosize but I am not getting the required result.

c# winforms