1

I made a small 2D game in C# but here is the problem:

when I launch the game on my laptop with a resolution of 1366x768, or on a laptop with 1920x1080 it works as wanted(all intel graphics), but when I launch the game on my pc with a HD6850 and a resolution of 1920x1080 the coordinates (locations) are off, like half of what they should be like:

A pictureBox is supposed to be on point x100 and y100 but is on something like point x50 and y50.

I would like to know why this is happening and how I can fix it.

Thanks in advance

Edit: Yes, I am making points, how can I fix errors with DPI? for instance: pictureBox1.location = new Point(100, 100);

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

Have a look at Graphics.PageUnit or Graphics.PageScale.

If either of these values differs between your laptop and your PC, adjust them.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150