0

I have stumbled upon interesting task that requires me to get the ID's of my displays. Theese ID's should be totally equal to the one you see in 'display settings' as shown on this image.

I have tried using NativeMethods, that seems to return nothing that could be even similar to that numbers. The closest that I got is '\.\DISPLAYx' thing but 'x' does not correlate with the numbers in display settings. So I got curious if it possible at all. Does anyone knows any ways to do so?

Thank you in advance! P.S. It's my first post here, so if I missing any additional info you might need don't hesitate to ask, thank you :)

  • These numbers may simply correspond to the order in which the monitors are yielded when they are enumerated, have you checked that? – Mike Nakis May 11 '23 at 11:10
  • Have you tried this? https://stackoverflow.com/a/1538620 – RatzMouze May 11 '23 at 11:18
  • Maybe the index of the item in this list `System.Windows.Forms.Screen.AllScreens` – Arnaud May 11 '23 at 11:20
  • The numbers are just the monitors. You can use WMI to get those numbers, however if you swap them to different positions you will need to override the conditional value to update the position of the new locations. These are derived off the HDMI... It like input 1 and input 2 on a TV.. the numbers can change so it's best to write your own custom event and notify of change methods – Camp Nerd May 11 '23 at 11:47

0 Answers0