I am running visual studio 2008. Every so often when I go to the designer view of one of my forms, the designer will make the form slightly larger. This happens on forms where I have a minimum size. I want the form to be the minimum size so why does it keep adjusting the size on me?
-
This question seems like it might be similar to http://stackoverflow.com/questions/1158130/visual-studio-2005-designer-moves-controls-and-resizes-form/4404710#4404710 – ryantm Dec 10 '10 at 01:01
3 Answers
I was having this issue with a particular form that hosted a user control. Everytime I did a full Rebuild Solution it would make the form shorter. Found a simple solution: in the designer, set the minimum size property of the form to be the same as the size property. Now when the designer messes around trying to change the size it will end up as the minimum size - which is the size you actually want.
-
This was the only solution I found out of all the solutions offered that fixed my problem. I am using VS 2010. – fraXis Apr 25 '12 at 07:41
-
I had to also set the maximum size value but that that fixed it. I also tried changing the AutoScaleMode to none as suggested elsewhere but that didn't fix it. – Kevin Gale May 20 '14 at 17:25
Have you checked AutoSizeMode on the form? Is the form inherited from a base form?

- 13,871
- 9
- 56
- 78
This solution might not be ideal, but I've had problems with the designer taking on a life of its own and this worked for me.
Subscribe to your forms Resize event either in the designer or constructor, and in the function call this.Size = this.MinimumSize.
This will have an effect on the way the designer behaves too, VS must precompile some events for the designer or something.

- 3,400
- 5
- 24
- 37