using System; using System.Drawing; using System.Collections.Generic; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { IntPtr[] handles = BFS.Window.GetVisibleWindowHandles(); int len = handles.Length; SortedDictionary<int, string> positions = new SortedDictionary<int, string>(); string output = ""; for (int i = 0; i < len; i++) { positions.Add((int)handles[i], BFS.Window.GetBounds(handles[i].ToString()); } foreach (KeyValuePair<int, string> key in positions) { output += "ID: " + key.Key + " Location: " + key.Value + " " + BFS.Window.GetText((IntPtr)key.Key) + "\r\n"; } BFS.Dialog.ShowMessageInfo(output); } }
using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { if (BFS.Application.IsAppRunningByFile(@"C:\Program Files (x86)\Steam\Steam.exe")) { IntPtr steam = BFS.Application.GetMainWindowByAppID(BFS.Application.GetAppIDByFile(@"C:\Program Files (x86)\Steam\Steam.exe")); BFS.Window.SetSizeAndLocation(steam,1,1,1000,663); } } }
using System; using System.Drawing; using System.Collections.Generic; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { IntPtr[] handles = BFS.Window.GetVisibleWindowHandles(); int len = handles.Length; SortedDictionary<int, string> positions = new SortedDictionary<int, string>(); string formatted = ""; for (int i = 0; i < len; i++) { positions.Add((int)handles[i], BFS.Window.GetBounds(handles[i]).ToString()); } foreach (KeyValuePair<int, string> key in positions) { formatted += string.Format("ID: {0,-15} Location: {1,50} {2} \r\n", key.Key, key.Value, BFS.Window.GetText((IntPtr)key.Key)); } BFS.Dialog.ShowMessageInfo(formatted); } }