/// <summary> /// Gets all child windows of the specified window /// </summary> /// <param name="hWndParent">window handle for which to get children.</param> public void GetWindows(IntPtr hWndParent) { items = new Win32EnumWindowsCollection(); UnManagedMethods.EnumChildWindows(hWndParent, WindowEnum, 0); }
/// <summary> /// Gets all top level windows on the system. /// </summary> public void GetWindows() { items = new Win32EnumWindowsCollection(); UnManagedMethods.EnumWindows(WindowEnum, 0); }