Beispiel #1
0
        private void GoToWindow(IntPtr owner, GoToNavigation gotoNav)
        {
            var hwnd = owner;

            switch (gotoNav)
            {
            case GoToNavigation.Next:
                hwnd = NextWindow(owner);
                break;

            case GoToNavigation.Previous:
                hwnd = PrevWindow(owner);
                break;

            case GoToNavigation.Ancestor:
                hwnd = WinUser.GetAncestor(owner, 1);
                break;

            case GoToNavigation.Child:
                hwnd = WinUser.FindWindowEx(owner, IntPtr.Zero, null, null);
                break;
            }
            if (hwnd != IntPtr.Zero)
            {
                hwndText.Text = hwnd.ToString("X8");
            }
            var item = GetWindowToString(hwnd);

            hwndlist.SelectedItem = item;
            hwndlist.BringIntoView();
        }
Beispiel #2
0
 private void GoToWindow(string str_owner, GoToNavigation gotoNav)
 {
     GoToWindow(new IntPtr(Convert.ToInt32(str_owner, 16)), gotoNav);
 }