Lasse V. Karlsen
Lasse V. Karlsen

Reputation: 391396

Event for when the number of displays changes in .NET?

I have a program that needs to update some internal data structures when the number of attached displays changes, like when you put your laptop into the docking station and your dual monitors comes to life.

Couple of questions in this regard:

If it matters, this is .NET 3.5 and C#.

Upvotes: 4

Views: 1524

Answers (1)

ChrisF
ChrisF

Reputation: 137148

Have you looked into SystemEvents.DisplaySettingsChanged Event:

Occurs when the user changes the display settings.

There's not much more information than this on the MSDN but it might be of some use.

Upvotes: 7

Related Questions