Ejemplo n.º 1
0
    private IEnumerator TrackWindow()
    {
        while (isActiveAndEnabled)
        {
            IntPtr hwndGw2 = Win32.FindWindow("ArenaNet_Dx_Window_Class", null);
            if (hwndGw2 != IntPtr.Zero)
            {
                var rect = new Win32.RECT();
                Win32.GetWindowRect(hwndGw2, out rect);

                Win32.SetWindowPos(hwndApp, new IntPtr(-1), rect.Left, rect.Top, rect.GetWidth(), rect.GetHeight(), Win32.SWP_SHOWWINDOW);
            }

            yield return(new WaitForSeconds(1.0f));
        }
    }