public static WindowControl GetForegroundWindow() { IntPtr hwnd = User32APIs.GetForegroundWindow(); return(new WindowControl(hwnd)); }