Form size not working properly

divjoy

Well-known member
Joined
Aug 25, 2013
Messages
158
Programming Experience
1-3
Hi,
I have a from with a Tabcontrol and inside a Datagridivew. I am using windows 10 and VS 2013

When I launch the form it doesn't size to the size as created in the designer. I checked my code and at no point do I adjust the form size programmatically.

I been reading on line and it does seem to be a problem that no one has found a solution too other that resize the form in the Shown event!

The form width in designer mode is 1731 but when it launches it shrinks and cover some of the controls, I then set the width to 1297 in the Shown event and it works OK.

I also had to change the Tabcontrol and Datagridivew anchors from Left, Right, Top, Bottom to just Left and Top to make it work otherwise it would shrink.

I tried changing the AutoScaleMode, Autosize etc but it didn't have any effect. From reading online it may have something to do with Font size on the form or the Datagridview, not sure tbh.

There does seem to be a few reports about it online but the only solution to to resize programmatically, but then I lose the ability when resizing the Form to make the Tabcontrol and Datagridivew to resize with it!

Funnily enough tho other Forms in the same app have no problem!, obviously something IM doing wrong!

Has anyone else experienced this? It feels like the design size and code size are two different measurements!
 
Top Bottom