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.
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.


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.