Having a problem setting the position of a window on the second screen while running HiDPI app on windows.
I have a simple test app compiled in Xojo 2017r2.1 and 2017r3 which does
[code]dim w as Window1
dim i as integer
dim s as screen
for i = 0 to ScreenCount - 1
s = screen(i)
w = new window1()
w.Left = s.Left
w.Top = s.Top + 50
w.Show()
next i[/code]
in app open, where Window1 is NOT an implicit instance and no windows set for startup in app.
And in the Window1.Paint event
g.ForeColor = &cff0000
g.FillRect(0,0,g.Width,g.Height)
g.ForeColor = &C000000
g.DrawLine(0,0,g.Width,g.Height)
g.DrawLine(g.Width,0,0,g.Height)
So basically i am adding a window to top, left of every screen, adding extra 50 pixels down for windows menu bar etc. I would assume that this would work no matter where the screen is position in Windows screen positioning. Alas it only works if it is aligned at top or Bottom. Having the window in the middle somewhere does the following.
However if i turn off HiDPI then
Works as expected after a restart of app.
I am running this on Surface Pro 4, windows 10. Main screen is 200% scaling and external moniter is 1980x1080 at 100% scaling (all the recommended settings)
If i rearrange the displays and apply the changes then the window snaps to the correct location.
Any idea on how to get this to correctly position on HiDPI