using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
public static class DisplayFusionFunction
{
public static void Run()
{
uint appID = BFS.Application.Start("c:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "");
int count = 0;
while (true)
{
IntPtr foo = BFS.Application.GetMainWindowByAppID(appID);
if (foo != IntPtr.Zero)
break;
BFS.General.ThreadWait(250);
if (++count >= 30000 / 250) // loop for 30 seconds
return;
}
IntPtr windowHandle = BFS.Application.GetMainWindowByAppID(appID);
uint monitormonitorID = BFS.Monitor.GetMonitorIDByWindow(windowHandle);
string output = "";
output += string.Format("appID 0x{0}: Handle: {1} Monitor: {2} " + Environment.NewLine, appID.ToString(), windowHandle.ToString("x8"), BFS.Monitor.GetMonitorIDByWindow(windowHandle));
BFS.Dialog.ShowMessageInfoMonospaced(output);
bool bar = BFS.Window.MoveToMonitor(2, windowHandle);
}
}