1

I want to list the displays on a system in the same sequence as they are indexed on Windows Settings.

I have two monitors attached to my system, but in Delphi the Screen.Displays array appears to be in the wrong sequence E.G. With two horizontally positioned displays, Display Index 0 relates to the rightmost display which is listed as display 2 in Windows Settings. Likewise, Display Index 1 relates to the leftmost display which is listed as display 1 in Windows Settings. How can I be certain to get the Indexes in the same order as they are listed within the operating system (PC and Mac)?

Ballinger
  • 11
  • 1
  • Index property is the index of the display in the Displays array, we don't care about the OS. You can use the Primary property to get the order because all coordinates are relative to the primary monitor – Bosshoss Dec 21 '22 at 22:02
  • In Windows Delphi calls `EnumDisplayMonitors` to populate the `Displays` array. There is no documentation that guarantees the order of the monitors returned by the call. – Alex Sawers Dec 30 '22 at 15:53

0 Answers0