1

I have recently started learning C# in school and am now working on a little C#-Forms game. The problem is that labels and pictureboxes show up not at the spot where I put them in the designer. This is not a very awful thing but it is annoying when designing the form.

Also my computer (Windows 10) doesn't use the same layout as the designer which is also a bit annoying when designing buttons, checkboxes, etc.

Does anybody know how to fix this?

DavidG
  • 113,891
  • 12
  • 217
  • 223
Ian H.
  • 3,840
  • 4
  • 30
  • 60

1 Answers1

1

Probably your Windows 10 is doing some scaling to make the controls fit on the screen. It can be very annoying to get this working.

The most important thing you have to do is not relying on positions. Use grids as much as possible to form your layout, like TableLayoutPanel and FlowLayoutPanel. Use AutoSize as much as possible and let the control build itself.

Another option would be to use WPF, which is built to work with different screen resolutions.

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325