Sharing this in case it helps others.
I have an app that assumes it’s main window opens on Screen(0) by default. It needs to open certain other windows on a different, user-selectable screen.
It was working fine on a few setups, but yesterday I added a second monitor to a new workstation and was dismayed to find that Windows had assigned “Display 1” to the new “external” monitor, and the all-in-one PC’s display, where my app will show its main window, was now assigned to Windows display 2. In the screenshot below, the internal display is 2 and the external is 1.
I was concerned that this would break my app and require adding UI and a preference for remembering which screen is “Main”. I scoured the web looking for a way to get Windows to renumber its displays, but despite scores of long threads on the topic, I found no solid solution.
I was relieved then, to find that Xojo happily always assigns Screen(0) to the “Main” screen regardless of Windows’ numbering (yes, I know the docs say it’s the “main” screen, but I still wasn’t sure that it wouldn’t rely on Windows’ idea of “Main”). Here’s Xojo identifying the main screen as Screen(0) (adjusted to 1 for user-friendliness), even though Windows numbers it higher than the other screen. Whew!