How do you autosize a winform?
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.
精彩评论