How to? Move Window Between Monitors

Is there a way, using a TCC command, to move any window from monitor 1 to monitor 2 on a two monitor system, other than using the mouse?

In Windows 7, I understand the OS comes with keyboard shortcuts to do this. However, I am using Vista Business.

In TCC, the START command has the /MONITOR=n option, which is great when I launch a program, but I want to be able to move the window between monitors after it has been started.

I have been using the Swap Screen utility to do this, and it does what I want it to, but just wondering if TCC has a command to do this already. I have looked at the WINDOW and ACTIVATE commands, but might have missed it.

TCC 15.01.49 Windows Vista [Version 6.0.6002]
TCC Build 49 Windows Vista Build 6002 Service Pack 2
Registered to Joe Caverly - 1 System License

Charles Dye

Super Moderator
Staff member
May 20, 2008
Albuquerque, NM
WINDOW and ACTIVATE both have a /POS= option to move a window around on the (virtual) screen. Moving your window from monitor to monitor using WINDOW/ACTIVATE is possible, but not terribly easy, because (1) you need to know the screen coordinates for the target monitor -- I don't know any simple way to pick this info up in TCC; and (2) you need to know the current height and width of the window to be moved; @WINSIZE provides these, but in the reverse of the order expected by WINDOW and ACTIVATE.
May 20, 2008
Syracuse, NY, USA
Somewhere I have a plugin, alias, something that made that easy. I'll get back in a little while.
Found it. It's a little (2K) EXE which moves the foreground window either one screen-width to the right or to the left depending on its current position. If the mouse pointer is within the foreground window it'll move that too. So a keystroke alias would be perfect. If you're doing it in TCC then no doubt TCC is the foreground window; if you're doing it in TCMD/TCC then no doubt, TCMD is the foreground window. (I used to use it via a global hotkey; used in that way it would move anything.) I'll upload a ZIP of it with this post.


    622 bytes · Views: 65
I don't know any simple way to pick this info up in TCC

Hello Charles;
The @WINMETRICS variable function gave me the solution.

The width of monitor 1 is %@WINMETRICS[0]

The start of monitor 2 is %@WINMETRICS[0] + 1

So, to move my desired window to monitor 2, I use ACTIVATE thus;

if %@winmetrics[80] gt 1 activate "DOSBox*" /pos=%@eval[%@winmetrics[0]+1],1,0,0

Also useful for more than one monitor are parameters;

76 Coordinate of left side of virtual screen
77 Coordinate of top of virtual screen
78 Width in pixels of virtual screen
79 Height in pixels of virtual screen
80 Number of monitors on desktop

Appreciate the MOVEIT.EXE, but the TCC solution solves my problem. Thankyou, regardless.

Similar threads
Thread starter Title Forum Replies Date
C question re: Move Support 3
samintz MOVE and Prompt on overwrite Support 3
M MOVE does not behaves like intended (on failure) Support 1
kb6ojs Make /G parameter persistent in COPY/MOVE command? Support 4
F Regexes in REN/MOVE/… commands seem to not work at all Support 3
T How to? Off screen move? Support 3
fpefpe Documentation copy/move using /c or /u Support 2
W Recursive move aborts early Support 2
C b21 MOVE /B Support 8
D How move cursor out of popup edit control after no match? Support 14
nickles Move takecommand.18.0.key location to installation directory Support 4
J junction copy/move handling Support 6
J WAD move /s regression from tcc15 Support 5
C move /F Support 4
vefatica MOVE anomaly Support 8
C Move /s sorce target Support 13
Stefano Piccardi b32 move /Q writes message Support 1
C How to? MOVE and handling out of space Support 2
S How to? Move files older than one year Support 9
fpefpe move /g Support 4
C Move /MD not always working Support 1
C Move question with Encrypted file... Support 6
W /g option (%) on MOVE cmd appears broken TCC 14.03.57 x64 Support 8
G Fixed MOVE truncates files Support 9
C MOVE making empty destinatation sub-folders Support 10
thedave Move files, inherit permissions Support 14
A Discrepancy in handling of "can't copy or move file to itself" Support 4
A expected behavior of move /sx Support 14
S MOVE from FTP directory to another FTP directory - bug?? Support 2
J directory tree - move or copy Support 3
D MOVE Help typo Support 3
D Suggest Help mention /n no effect in move /n Dir1 Dir2 Support 0
D Move /v to DVD fails but files identical Support 4
S Conditionally MOVE/COPY files on the basis of size Support 1
S MOVE to different drive Support 3
Joe Caverly Move Buttons Between Tabbed Toolbars Support 2
S Another 4NT 8.02 vs TCC 9.02 diff - MOVE command Support 3
S MOVE command over FTP with 4NT 5.00U Support 0
R History window wrong size, can't remember size change Support 12
R @select inside alias gives different (insanely small) window Support 7
K_Meinhard How to? Help window position Support 7
D Directory History Window with wildcard search Support 3
Dmitry L. Kobyakov Documentation Error in the Help: the WINDOW command Support 0
L LIST's pop-up search loses focus in a Windows Terminal window Support 15
ntak About window size notification Support 6
R Batch Debugger Command Expansion Window Support 3
R How do I get a Git Bash shell to appear in TCC window? Support 7
G Press on another Window Support 24
Peter Murschall IDE: After undocking the command expansion Window is offended Support 2
T TCC Window Background Color Anomaly Support 9

Similar threads