using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { string appPath = @"F:\\Emulations\\Ordinateurs\\C64\\CCS64\\CCS64.exe"; // Don't forget, use double backslash and not single backslash string appArgs = @""; //any arguments for your application go here, otherwise just make this blank" // Launch the window 1 (top left) and move/size it uint appID = BFS.Application.Start(appPath, appArgs); windowHandle = BFS.Application.GetMainWindowByAppID(appID); BFS.Window.SetSizeAndLocation(windowHandle, 1360, 0, 404, 364); // Launch the window 2 (top middle) and move/size it appID = BFS.Application.Start(appPath, appArgs); windowHandle = BFS.Application.GetMainWindowByAppID(appID); BFS.Window.SetSizeAndLocation(windowHandle, 1764, 0, 404, 364); // Launch the window 3 (top right) and move/size it appID = BFS.Application.Start(appPath, appArgs); windowHandle = BFS.Application.GetMainWindowByAppID(appID); BFS.Window.SetSizeAndLocation(windowHandle, 2168, 0, 404, 364); // Launch the window 4 (down middle) and move/size it appID = BFS.Application.Start(appPath, appArgs); windowHandle = BFS.Application.GetMainWindowByAppID(appID); BFS.Window.SetSizeAndLocation(windowHandle, 1764, 370, 404, 364); // Launch the window 5 (down right) and move/size it appID = BFS.Application.Start(appPath, appArgs); windowHandle = BFS.Application.GetMainWindowByAppID(appID); BFS.Window.SetSizeAndLocation(windowHandle, 2168,370, 404, 364); // The window 6 (down left) is moved and sized by 2 actions // 1 - Move Windows to Selected Monitor // 2 - Move Window to Specific Size and Location } }