using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
IntPtr window = BFS.Application.GetMainWindowByFile(@"*\ApplicationFilename.exe");
if (window != null)
{
Rectangle monitorRect = BFS.Monitor.GetMonitorBoundsByWindow(window);
Rectangle windowRect = BFS.Window.GetBounds(window);
Point newLocation = new Point(monitorRect.X + (monitorRect.Width / 2) - (windowRect.Width / 2),
monitorRect.Y + (monitorRect.Height / 2) - (windowRect.Height / 2));
BFS.Window.SetLocation(window, newLocation.X, newLocation.Y);
BFS.Window.Focus(window);
}
}
}