using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { // (Google Chrome tab dragging fix) if(BFS.Input.IsMouseDown("1")) return; // Get the monitor that the mouse cursor is on uint currentMonitor = BFS.Monitor.GetMonitorIDByXY(BFS.Input.GetMousePositionX(), BFS.Input.GetMousePositionY()); // Setup the locations for the left and right monitors Rectangle topMonitorLocation = new Rectangle(-554, -1034, 1523, 1028); Rectangle toptopMonitorLocation = new Rectangle(-240, -2240, 1920, 1160); // Move window on which monitor the mouse cursor is on if (currentMonitor == 4) { BFS.Window.SetSizeAndLocation(windowHandle, topMonitorLocation.X, topMonitorLocation.Y, topMonitorLocation.Width, topMonitorLocation.Height); } else if (currentMonitor == 5) { BFS.Window.SetSizeAndLocation(windowHandle, toptopMonitorLocation.X, toptopMonitorLocation.Y, toptopMonitorLocation.Width, toptopMonitorLocation.Height); } } }