Grabacr07 / VirtualDesktop

C# wrapper for the Virtual Desktop API on Windows 11.
MIT License
631 stars 135 forks source link

VirtualDesktop FromHwnd(IntPtr hWnd) Exception #42

Closed wil70 closed 4 years ago

wil70 commented 5 years ago

When I start a new application (like Chrome) and ask for its desktop (via VirtualDesktop FromHwnd(IntPtr hWnd)), then I get the following exception: {"Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND))"}

If I click one the application that I just started and then call again "VirtualDesktop FromHwnd(IntPtr hWnd) " then I do get an exception and the function works well..

Any idea?

Thanks!

rhyek commented 4 years ago

Why was this closed?