using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Get the Primary monitor's ID
uint primaryMonitor = BFS.Monitor.GetPrimaryMonitorID();
// Loop through all monitors
foreach (uint monitor in BFS.Monitor.GetMonitorIDs())
{
// Ignore the Primary monitor
if (primaryMonitor != monitor)
{
// Loop through all windows on the monitor and move them to the Primary monitor
foreach (IntPtr window in BFS.Window.GetVisibleAndMinimizedWindowHandles())
{
if (BFS.Monitor.GetMonitorIDByWindow(window) != primaryMonitor)
BFS.Window.MoveToMonitor(primaryMonitor, window);
}
}
}
}
}