May 11th, 2009

How do I get a window back on the screen when it moved far, far away?

Commenter Aggravated notes that some programs remember their location when the window is closed and restore to that location when the window is reopened, even if that position is off the screen. These programs clearly were using screen coordinates instead of workspace coordinates to save and restore the window.

Okay, so you’ve got a program that restored its window position incorrectly and ended up putting it off the screen. Now what do you do?

The keyboard interface comes to the rescue.

Switch to the application, say by clicking on its taskbar button or by Alt+Tab’ing to it. Then type Alt+Space to call up the System menu: You should get a window floating at the edge of the screen. Type M to select Move, then press an arrow key to enter Move mode. (Doesn’t matter which.)

At this point, you could stick with the keyboard motif and hold down the appropriate arrow key to move the window back onto the screen. Or you can pull a little magic trick: Wave the mouse around. Boom, the window leaps to the mouse like one of those cheapo magic tricks where something leaps into your hand.

I’m like 95% sure they use string. But it could be magic. No, I’m going with the string.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.