Delay's Blog is the blog of David Anson, a Microsoft developer who works with the Silverlight, WPF, Windows Phone, and web platforms.
http://dlaa.me/
@DavidAns
I wrote WindowPlacementTool in December of 2000 to solve a problem I had after beginning to use Terminal Services/Remote Desktop regularly. I made WindowPlacementTool available internally in 2001. Last week someone asked about getting access the source code to make some customizations and I figured I'd post the tool and its source here for anyone to use.
Download WindowPlacementTool and its source code by clicking here.
Details:
Summary ======= If you're picky about the layout of the windows on your desktop or if you connect to your machine with Terminal Services at differing resolutions, you're probably annoyed by having to re-layout your windows on a regular basis. It seems like something (or someone!) is always coming along and messing with your layout. But now that's a problem of the past; WindowPlacementTool can do all the work for you! Just run it once to capture the layout you like, and then run it again whenever you need to restore that layout. And because you can save multiple layouts, switching resolutions is a breeze. Yep, it's that easy! Command Line Help ================= WindowPlacementTool Copyright (c) 2000 by David Anson (DavidAns@Microsoft.com) [-h | -help | -?] This help screen [-c | -capture] [Capture_file_name.txt] Capture the current window positions to a file (or standard output if no file name is given) [Restore_file_name_1.txt] [Restore_file_name_2.txt] ... Restore the window positions from the data previously captured in the specified file(s) (or standard input if no file name is given) Example Setup ============= [Layout your windows however you'd like them] [Capture the current layout to a file] C:\Temp>WindowPlacementTool.exe -c 800x600.txt [Optional: Edit the file to remove any programs you don't care about] C:\Temp>notepad 800x600.txt [Optional: Create a shortcut on your desktop for easy access to this layout] [Here, the shortcut would run "WindowPlacementTool.exe C:\Temp\800x600.txt"] Example Use =========== [Run the shortcut you created above or run WindowPlacementTool manually] C:\Temp>WindowPlacementTool.exe 800x600.txt Notes ===== * WindowPlacementTool saves the RESTORED locations of windows. If a window is currently maximized or minimized, its restored location will be adjusted, but the window will not be un-maximized or un-minimized by WindowPlacementTool. * I have placed a shortcut to a layout for each resolution I use on my taskbar so that it's always available when I need it.
Additional notes:
WindowPlacementTool has served me well over the years - I hope others find it useful and/or educational!