Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get screen identification number from Screen class

Tags:

c#

i need to show dialog in screen by its identification number, for example i have this situation screen setup on windows

I want to show something on fourth, when i get all screens by using Screen.AllScreens, my fourth screen is 0 element in array, because AllScreens returns screens not by indent number but by squence. So mayby someone knows the way how to get identification number from Screen class, or how to get screen coordinates and bounds by its identification number.

UPDATE:

DeviceName is not always corrspont to identification number (see image below):

enter image description here

like image 527
Velutis Avatar asked Nov 13 '22 22:11

Velutis


1 Answers

If you look at screen.DeviceName you should get \\\\.\\DISPLAY1, \\\\.\\DISPLAY2, etc. You can use this to search for \\\\.\\DISPLAY4.

like image 60
Johnny Mopp Avatar answered Nov 15 '22 12:11

Johnny Mopp