views:

13

answers:

1

In my C# .NET 3.5 application I am using WinForms forms with docking and anchoring. I am working on a desktop with big display and on a small laptop.

A few forms has a list view with anchors set to both 4 bounds and a few buttons below.

My forms are shown incorrectly: if I edit a form on the desktop computer, on the notebook the lowest buttons will be not shown (will be cut by a container bounds) and I only see stretched list view. If I edit a form on the laptop, on the desktop computer it will not fill the container completely.

I found the reason - the form's AutoScaleDimensions differs for these two computers, on the desktop it is (8F, 16F) while on the laptop it is (6F, 13F). I am puzzled of how to make my GUI working on both?

A: 

It seems I found the solution myself: the reason of incorrect behavior was that my user control and containing forms were designed on different computers so they scaling did not match. After I opened them all in a single computer and set user control's AutoScaleMode = AutoScaleMode.Inherit, it worked perfectly.

Alex