[python-win32] CreateDesktop() and displaying a window on it

eryk sun eryksun at gmail.com
Fri Apr 7 13:14:43 EDT 2017


On Fri, Apr 7, 2017 at 4:35 PM, Tim Roberts <timr at probo.com> wrote:
> I see Eryk provided the explanation, but all I had to do to make your
> example work was add
>     hDesk.SetThreadDesktop()
> just after your SwitchDesktop call.

That didn't work for me before. It was causing my Windows 10 system to
get stuck on a blank desktop. The SetThreadDesktop call was failing,
which I assumed was because tkinter was automatically creating an
invisible window or hook in the main thread. That's why I used a new
thread as a workaround. But just now it worked. Go figure.


More information about the python-win32 mailing list