UI automation: Desktop icons are not in Program Manager tree after Win + D "Hide Desktop" RRS feed

  • Question

  • Hi,

    I would like to be sure, that this behavior is "by Design" in Windows 7 and 10. 

    Reproducing steps for Windows 7, 10 :

    1. Open notepad, for instance, to be sure that Win+D works.
    2. Win + D. Notepad is minimized.
    3. Get Program Manager tree via UI automation COM interface: there are no desktop icons list.
    4. Win + D. Notepad is open.
    5. Get Program Manager tree via UI automation COM interface: desktop icons list present.

    Thursday, April 30, 2020 1:19 PM


All replies

  • Hello,

    Do you mean the "Desktop" list shows in the following snapshot?

    If above assumption is correct, I can't reproduce this issue. Because I test Windows 7 and Windows 10 with Inspect.exe, both works for me. Can you have a try to see if it works for you? Or show your reproducible demo code so I can do a further investigation.

    If above assumption is not correct, could you show more information about "desktop icons list"?

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, May 1, 2020 2:38 AM
  • Hello Rita,

    Thank you for answer.

    Your assumption is correct.

    I tried to reproduce it with Inspect.exe too and it is not reproducible when we have some application opened (Inspect.exe).

    I will prepare demo code in 3-4 days.

    Friday, May 1, 2020 9:58 AM
  • I could reproduce it on Windows 10 - 1803

    by filling a TreeView from "Progman" with IUIAutomationTreeWalker

    If I simulate [Win] + [D] just before (or with Shell.ToggleDesktop), the TreeView is empty...

    • Edited by Castorix31 Friday, May 1, 2020 10:28 AM
    Friday, May 1, 2020 10:17 AM
  • In fact, the icons are still there.

    It is because the parent has been changed to a WorkerW class window =>

    Friday, May 1, 2020 10:58 AM
  • Thank you for info, Castorix31.
    Saturday, May 2, 2020 7:32 AM
  • Thanks for your confirmation. Once I have your reproducible demo code I can try to reproduce this issue to see what's the problem is.

    As I posted above, there is no problem : the parent of the ListView is just changed...
    Monday, May 4, 2020 6:32 AM
  • Yes, I see it too.


    Wednesday, May 6, 2020 2:27 PM