Tag Archives: autosize

Allow a user to resize an Autosize form

Set a form to “autosize”  allows the form to shrink or grow by it’s contents. It however does not allow the user to resize the form manually.

To allow the user to resize the form set the form AutoSize property to false in the form onLoad event handler. This  allows the form resize initially but user resizable afterwards.

Of course changing the contents of the hosted controls may require you to resize the form. You can set the AutoSize  to true before making the changes or use the GetPreferredSize method and resize the form yourself.

Lastest update in May 2011, inital post in May 2011