Closed lihuelworks closed 5 years ago
Hello lihuelworks,
This is not really an issue with PSVirtualDesktop but with the way Windows retrieves window handles. But I will investigate this, maybe there is a comfortable solution.
Greetings
Markus
Hello lihuelworks,
in the new version 1.1.0 of VirtualDesktop there is the function Find-WindowHandle. You use it to find a window with the text (partly is allowed, search is case insensitive) in its title. If that is not enough, you can get a list of windows with handles with Find-WindowHandle '*'
I hope this solves your issue.
Greetings
Markus
Since there was no reply for over a month I assume the issue is closed with the latest Version of PSVirtualDesktop.
I'm having a difficulty moving a window with multiple processes, like Chrome and Explorer, to another virtual desktop using the samples in the Github Readme.
Expected behavior: The sample command is input a Powershell session, and the window (e.g Chrome) is moved to the desired desktop (The third one, number 2).
Actual Behavior: The command gives an error in parameters akin to this (The second command is to prove Chrome exists, being a window with two tabs)
Edit: I think it has to do with how MainWindowHandle gets the Handle number, as this StackOverflow post puts it (https://stackoverflow.com/questions/4727023/why-cant-get-the-main-window-handle-for-a-started-process). It may also happen with fullscreen apps.