1

I created a Windows application in VS 2013 on W7. It's running great and no issue but recently I bought a new W8 laptop and tried to run the application on W8. All my controls are misaligned and some overlap. AutoScaleMode is set to Font for each form.

Examples:

Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38
mak101
  • 147
  • 1
  • 11

1 Answers1

1

It's not Windows 8 that's the problem, but a higher DPI setting.

The best option would be to switch over to WPF, but the problem can be mitigated with some care. You might consider a TableLayoutPanel for this application (it looks table-ish to me).

If you can't/won't use a layout panel, set the AutoScaleMode property of your form (and other containers, like Panels) to Font. If that doesn't work, try Dpi. See the MSDN page on that enum for more information.

Further StackOverflow reading (or "works cited"): "Creating a DPI-Aware Application" and "How to control the font DPI in a .NET WinForms app"

Community
  • 1
  • 1
Ben N
  • 2,883
  • 4
  • 26
  • 49