开发者

How do you autosize a winform?

开发者 https://www.devze.com 2023-03-21 23:18 出处:网络
I have a form.. I want to bring it to 400 by 400 from 1000 by 1000.. when i drag it in the design mode..scroll bars appear and it content of the board doesnt shrin开发者_StackOverflow中文版k proportio

I have a form.. I want to bring it to 400 by 400 from 1000 by 1000.. when i drag it in the design mode..scroll bars appear and it content of the board doesnt shrin开发者_StackOverflow中文版k proportionally with my shrinking (by dragging the corner of the winform form inwards)..

How can i autosize the content of the form with my mouse drag?


Look into Dock and Anchor properties for your controls. Winforms does not scale the way WPF does with its vectors-- it's pixel based.

Either that, or make sure your AutoScrollMinSize is equal to 0, 0

For example:

On a button, if I highlight the gray bars for my anchors, the button will stay move with the bottom-right corner of the form.

How do you autosize a winform?

0

精彩评论

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