How Windows NT Saves Window Size and Location Parameters

ID: Q235994

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

The information in this article applies to:
  • Microsoft Windows NT Workstation version 4.0


SUMMARY

This article describes how Windows NT saves the size and location of a window when it is closed.


MORE INFORMATION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

Windows saves size and location information for closed windows in the following registry location:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams
Windows saves size and location information for up to 28 different windows. Each window's size and location parameters are stored in a subkey of the Streams key. The subkeys are assigned sequentially on a per-user basis. For example, when a new user logs on, the first window's parameters are stored in the subkey named 0. The second window's parameters are stored in a subkey named 1. After 28 subkeys have been created and a new window is opened, the parameters for the twenty-ninth window overwrite the parameters for one of the first 28 windows. When a window for which the parameters were overwritten is opened, the window opens with the default parameters for that window.

Windows stores the association for the Streams subkeys with a particular window in the following location:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU.
For example, if the Streams key has eight subkeys (0-7), the printers folder is assigned the Streams subkey named 6, you delete all of the Streams subkeys, and you then open the Printers folder, the printer is assigned the subkey named 6 again. This occurs because Windows has an entry in StreamMRU that associates the 6 subkey with the Printers folder. However, if you had deleted all of the Streams subkeys and the values in the StreamMRU key, the Printers folder would have been assigned the next sequential Streams subkey, which would be 0.

Troubleshooting

This may be useful if StreamMRU settings become "cross linked." In some cases, multiple programs may write window size and location information to the same Streams subkey. In this case, the stored size and location for program B's window might actually be the size and location for program A's window. Deleting the StreamMRU data and Streams subkeys should resolve this situation. Also, creating a new user account resolves this issue because the Streams and StreamMRU subkeys are created when a new user opens a window.

NOTE: Do not delete the MRUList value from the StreamMRU key.

Additional query words:

Keywords : kbenv
Version : winnt:4.0
Platform : winnt
Issue type : kbinfo


Last Reviewed: September 15, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.