C# 将窗口显示在指定屏幕
作者:互联网
Form Frm2 = new Form2(); Frm2.Show(); Screen[] screens = Screen.AllScreens;//获取当前所有显示屏 int count = screens.Count(); foreach (Form frm in Application.OpenForms) { if (frm is Form2) { frm.StartPosition = FormStartPosition.Manual; frm.Location = new Point(screens[count - 1].Bounds.Left, screens[count - 1].Bounds.Top);//将窗口显示在第二个显示屏 frm.WindowState = FormWindowState.Maximized; } }
标签:count,窗口,Form,C#,Screen,frm,screens,Frm2,屏幕 来源: https://www.cnblogs.com/blossomwei/p/16404269.html