views:

220

answers:

1

I'm working on a little WPF app that will run fullscreen and I'd like to give the user the ability to choose which monitor it will display on. To make it easier to identify each monitor in the list, I would like to do something like the Windows Display Settings dialog's "Identify Monitors" button.

Is there a way to invoke that function using P/Invoke or something? If not, I can always just open a new WPF window on each monitor containing a number, but I don't want to reinvent the wheel if it's built-in somehow.

+2  A: 

There's this question - http://stackoverflow.com/questions/716907/in-a-c-winform-how-do-identify-what-monitor-the-app-is-displayed-on - but it asks to identify which screen the application is running on, so as stated it won't do what you want. However, the System.Windows.Forms.Screen class might provide the methods you need.

It has an array:

Sreeen[] AllScreens;

Loop over the array and draw the index of the array at the centre of rectangle defined by Bounds or WorkingArea.

ChrisF