views:

864

answers:

1

If i were developing a screensaver using a windows.form in C# how would i support multiple monitors? obviously i need a way to enumerate the monitors and maybe create forms for them too or just fade to black? Has anyone solved this?

Any insight would be helpful, what's the best approach?

+2  A: 

I would recommend this article from CodeProject it helped me create my first screen saver and talks about multiple monitor support.

System.Windows.Forms.Screen class has all the information you need about how many monitors and what the bounds of those monitors are. The property AllScreens would be a good place to start.

for (int i = Screen.AllScreens.GetLowerBound(0); i <= Screen.AllScreens.GetUpperBound(0); i++)
{
ScreensaverFormList[i].Bounds = Screen.AllScreens[i].Bounds;
}

McN