Search code examples
vb.netvisual-studiovisual-studio-2013windows-8

Why is my Visual Studio (VB.NET) layout different in Design View vs. at run-time on my home computer, but identical on my work computer?


I've been developing a program with Windows Forms on my work computer in VB.NET using Visual Studio 2013. When I run it on my work computer, the forms at run-time look identical to the forms in design view - the same overall size, the same layout, etc. Here is what it looks like on my work computer - AND when I access my work computer over remote desktop from my home computer.

work computer

However, on my home computer, it looks different in design view than at run-time. The form in design view is smaller and labels are misaligned.

home computer

Both computers are running Visual Studio 2013 with the same settings. I'm working on a larger monitor at home, but the fact that things look right when I access my work computer over Remote Desktop makes me think it's not my monitor.

My work computer is Windows 7 while my work computer is Windows 8.1.

Things I've tried:

  • Anchoring/docking the labels, but the layout ends up looking wrong
  • Changing the AutoScaleMode to DPI instead of Font, but that only changes the appearance at runtime, not in design view, and it still doesn't match design view.

Any ideas?


Solution

  • I figured it out! It was a setting in Windows on my home computer. (Still unclear why it looked right via Remote Desktop, but maybe it uses the remote computer's settings instead of the local one's).

    The solution was:

    • Right click, choose "Screen Resolution"
    • Click "Make text and other items larger or smaller"
    • Check "Let me choose one scaling level for all my displays" and set size to "smaller - 100%"

    For some reason, on my home computer the size was set to 125%.

    setting to change