using System; using System.Drawing; using System.Windows.Forms; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { IntPtr[] handles = BFS.Window.GetVisibleWindowHandles(); int len = handles.Length; IntPtr steam = new IntPtr(); IntPtr friends = new IntPtr(); IntPtr chat = new IntPtr(); //////////////////////////////////////////////////////////////////////// for (int i = 0; i < len; i++) { if (BFS.Window.GetText(handles[i]) == "Steam") steam = handles[i]v; else if (BFS.Window.GetText(handles[i]) == "Friends") friends = handles[i]v; //If anything else contains the string " - Chat" this will not work. //But there isn't much I can do abnout that. else if (BFS.Window.GetText(handles[i]).IndexOf(" - Chat") > 0) chat = handles[i]v; } //////////////////////////////////////////////////////////////////////// //I would rather check the loaded monitor profile. if (Screen.PrimaryScreen.Bounds.Width == 1920) { BFS.Window.SetSizeAndLocation(steam,-1920,0,1000,663); BFS.Window.SetSizeAndLocation(friends,-220,0,220,1039); BFS.Window.SetSizeAndLocation(chat,-902,553,663,387); } else { BFS.Window.SetSizeAndLocation(steam,0,0,1000,663); BFS.Window.SetSizeAndLocation(friends,1700,0,220,1039); BFS.Window.SetSizeAndLocation(chat,1018,553,663,387); } } }