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;

        }

 

上一篇:Arrays类的常见方法


下一篇:Linux下针对服务器网卡流量和磁盘的监控脚本