if (Screen.AllScreens.Length == 2) { //此显示器是否为主屏 if (Screen.AllScreens[0].Primary) { this.Top = Screen.AllScreens[1].Bounds.Y; this.Left = Screen.AllScreens[1].Bounds.X; } else { this.Top = Screen.AllScreens[0].Bounds.Y; this.Left = Screen.AllScreens[0].Bounds.X; } } else if (Screen.AllScreens.Length == 3) { this.Top = Screen.AllScreens[2].Bounds.Y; this.Left = Screen.AllScreens[2].Bounds.X; }