You can try something like this:
private System.Windows.Forms.Screen findScreen(string screenName) {
System.Windows.Forms.Screen res = System.Windows.Forms.Screen.AllScreens.FirstOrDefault(s => s.DeviceName == screenName);
if (res == null)
res = System.Windows.Forms.Screen.AllScreens[0];
return res;
}
private void setupForms() {
System.Windows.Forms.Screen mainScreen = findScreen(@"\\.\DISPLAY2");
FrmMain frmMain = new FrmMain()
{
WindowStartupLocation = WindowStartupLocation.Manual,
WindowState = System.Windows.WindowState.Normal,
Left = mainScreen.WorkingArea.Left,
Top = mainScreen.WorkingArea.Top,
Width = mainScreen.WorkingArea.Width,
Height = mainScreen.WorkingArea.Height
};
System.Windows.Forms.Screen secondaryScreen = findScreen(@"\\.\DISPLAY1");
FrmSecondary frmSecondary = new FrmSecondary()
{
WindowStartupLocation = WindowStartupLocation.Manual,
WindowState = System.Windows.WindowState.Normal,
Left = secondaryScreen.WorkingArea.Left,
Top = secondaryScreen.WorkingArea.Top,
Width = secondaryScreen.WorkingArea.Width,
Height = secondaryScreen.WorkingArea.Height
};
}