编程语言
首页 > 编程语言> > C# Screen类实现多屏显示

C# Screen类实现多屏显示

作者:互联网

private void ShowOnMonitor(int monitor, Window window)
        {
            window.WindowStyle = WindowStyle.None;
            window.WindowStartupLocation = WindowStartupLocation.Manual;

            System.Windows.Forms.Screen[] screens = System.Windows.Forms.Screen.AllScreens;

            window.Left = screens[monitor].Bounds.Left;
            window.Top = screens[monitor].Bounds.Top;
            //window.Width = screens[monitor].WorkingArea.Width;
            //window.Height = screens[monitor].WorkingArea.Height;
            window.Show();
            window.WindowState = WindowState.Maximized;

        }

 

标签:WorkingArea,多屏,monitor,C#,Screen,screens,window,Top
来源: https://www.cnblogs.com/xhztech/p/15568716.html