using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Set the Monitor ID you want to move the windows from
uint sourceMonitorID = 3;
// Set the target monitor ID here
uint targetMonitorID = 2;
// Loop through the visible windows on the monitor and move them to the monitor that has the mouse cursor
foreach (IntPtr window in BFS.Window.GetVisibleWindowHandlesByMonitor(sourceMonitorID))
{
// If the window is minimized, move it to monitor 2 and minimize it
if (BFS.Window.IsMinimized(window))
{
BFS.Window.MoveToMonitor(targetMonitorID, window);
BFS.Window.Minimize(window);
}
// Otherwise, just move it to monitor 2
else
{
BFS.Window.MoveToMonitor(targetMonitorID, window);
}
}
}
}