public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { var appId = BFS.Application.Start("C:\\Users\\chemming\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",""); // BFS.General.ThreadWait(3000); // maybe needs to settle? var windowId = BFS.Application.GetMainWindowByAppID(appId); // BFS.General.ThreadWait(3000); // maybe needs to settle? BFS.Window.SetSizeAndLocation(windowId, 0,30,2600, 900); } }
public static void Run(IntPtr windowHandle) { var filename = "C:\\Users\\chemming\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"; var appId = BFS.Application.Start(filename); var appId2 = BFS.Application.GetAppIDByFile(filename); var windowId = BFS.Application.GetMainWindowByAppID(appId2); BFS.General.LogText("CDH-VS: "+appId.ToString()+" "+appId2.ToString()); BFS.Window.SetSizeAndLocation(windowId, 0, 0, 1200, 1200); }