using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { uint AppID = BFS.Application.Start("C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE", ""); BFS.General.ThreadWait(4000); windowHandle = BFS.Application.GetMainWindowByAppID(AppID); BFS.Window.MoveToMonitor(1, windowHandle); BFS.General.ThreadWait(500); BFS.Window.MoveToLeftMonitorHalf(windowHandle); AppID = BFS.Application.Start("C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE", "/select outlook:Calendar"); BFS.General.ThreadWait(4000); windowHandle = BFS.Window.GetWindowByText("*Calendar*Outlook*"); BFS.Window.MoveToMonitor(1, windowHandle); BFS.General.ThreadWait(500); int x = BFS.Monitor.GetMonitorWorkAreaByID(1).Width / 2; BFS.Dialog.ShowMessageInfo(x.ToString()); BFS.Window.SetSizeAndLocation(windowHandle, BFS.Monitor.GetMonitorWorkAreaByID(1).Width / 2, 0, BFS.Monitor.GetMonitorWorkAreaByID(1).Width / 2, BFS.Monitor.GetMonitorWorkAreaByID(1).Height / 2); } }