Program windows change size, position after KVM switch usage

Environment: 
2-port KVM switch, Windows 7 (64-bit), NVIDIA video card
Problem: 

When I used the KVM to switch from the Windows 7 machine to another machine, after awhile Windows would detect that I had "unplugged" or "turned off" my monitor — presumably because the KVM did nothing to make the monitor seem to still be present. When I toggled back to the Windows 7 machine, my program windows would be resized (much smaller) and moved to the upper-left corner. Some research online underscored that this is considered a "feature" of Windows, not a bug. That means the conscious decision was made to implement this behavior, which is actually a resizing of the desktop area (and the program windows shrink to fit). However, it adds frequent and annoying work for me to reset my windows the way I wanted them. While there are tools to streamline the latter, the original behavior is what I wanted to prevent.

Status: 
Fixed
The Fix: 

Credit for most of this fix goes to "Robert" on SuperUser.com, who posted information for editing the Windows registry. This doesn't actually prevent the behavior, but it masks the effect by having the "resized" desktop match the normal screen resolution.

In short, you'll need to use regedit to update some key/value pairs. Your exact situation may vary, but the information posted at the above link should get you close. In my case, there was originally only the NOEDID section (which appeared as "NOEDID_" followed by a bunch of other characters), but I did not have the SIMULATED section. After a video driver update, I noticed I had a section that started with NV (followed by a bunch of characters), which I'm pretty sure wasn't there before. It also had PrimSurfSize.cx and PrimSurfSize.cy settings to update.

In addition to the PrimSurfSize key/value pairs (in the 00 section under NOEDID), there's a 00 section under the higher-level 00 section, with ActiveSize.cx and ActiveSize.cy values. Set those to match the PrimSurfSize values. With luck(?), that should ensure that Windows always uses the display window size you want, regardless of the state of the system and monitor.

Fix License: 
Creative Commons: Attribution-ShareAlike