Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Win 10 Virtual Desktops
#1
Using the virtual desktops feature in Windows 10, what is the best way to move a window to a specific virtual desktop, or set it to be shown on multiple desktops?
#2
There are Windows API to move windows of current process, but not of other processes.
If other process, need to create a dll, inject it to the window's process and call the API from there. QM cannot do it.

To show on all desktops, try
SetWinStyle w WS_EX_TOOLWINDOW 5
#3
Can use keys.

example

Macro Move active window to next virtual desktop
Trigger CSd 0x4     Help - how to add the trigger to the macro
Code:
Copy      Help
;support multiple monitors, part 1
int wa=win; if(!wa) ret
int hmon=MonitorFromWindow(wa 0); if(!hmon) ret
int nTab=(MonitorIndex(hmon)-1)*2
;open desktop switcher window
key WT
int wtv=wait(5 WV win("Task View" "MultitaskingViewFrame"))
0.1
;support multiple monitors, part 2 (tested only with 2 monitors)
if(nTab) key T(#nTab)
;open context menu, and its submenu "Move to"
key Mm
;select first item and close the desktop switcher window
key Y Z

;tested: no accessible objects in the switcher window

Also the context menu has "Show this window on all desktops" ...
#4
Hopefully Microsoft will improve the API in the future, for now the key method works great for my purposes.
Thank you for looking into this!


Forum Jump:


Users browsing this thread: 1 Guest(s)