日期:2014-05-17 浏览次数:20960 次
private void openForms()
{
Form2 form2 = new Form2();
Form3 form3 = new Form3();
Form4 form4 = new Form4();
Screen[] screens = Screens.AllScreens;
if(screens.Length == 2)
{
List<Screen> lstScreen = new List<Screen>();
foreach(Screen screen in Screen.AllScreens)
{
if(screen.Primary == false)
lstScree.Add(screen);
}
form2.Location = lstScreen[0].WorkingArea.Location;
form3.Location = lstScreen[0].WorkingArea.Location;
form4.Location = lstScreen[0].WorkingArea.Location;
}
else if(screens.Length == 4)
{
List<Screen> lstScreen = new List<Screen>();
foreach(Screen screen in Screen.AllScreens)
{
if(screen.Primary == false)
lstScree.Add(screen);
}
form2.Location = lstScreen[0].WorkingArea.Location;