Wow. What a mess. For eons (ever since I got my latest Dell laptop) I've suffered from the dreaded "Resolution Change" issue. Close the lid (putting the computer in stand-by) and open it up again, only to find your resolution dropped down a notch (for me from 1440x900 to 1280x768) and have to reposition/resize windows all over the place.
It's been a common problem on the internet (or Internet if you prefer) with lots of people with various fixes. Some people blame the chipset and tell you to upgrade to the latest, others want you to give them your video specs only to tell you some lame excuse to use the stock drivers and not the Dell ones, some say it's inherent in Dell machines, others say "works on my machine" (Good for you, I should get them a sticker).
In any case, I finally found a solution that works for me so I'll share with the rest of the class in the hopes that someone might be able to fix their own plight with this problem. For my system I have a Dell Inspiron 9400 running Windows XP (SP2). The video is the stock Mobile Intel 945GM Express Chipset Family. From the various explainations on the net, I have a feeling this fix will work for different configurations (e.g. different Dell models, other Intel Chipsets or even nVideo drivers). The specifics will vary but you should be a smart enough dog to figure it out. Adapt!
Here goes. Crack open regedit (Windows Key+R, "regedit", Enter) and lets go. You can back up your registry if you really want but this change seems pretty minor and I don't think you'll be in a bad place after it.
Dive down into HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\Video
There you'll see a bunch of GUID subkeys (these vary in number and names). Expand them and you'll either see "0000" and "Video" subkeys or maybe "0000"/"0001" ones (again, depends on the system). The ones you'll want to find are the "0000" ones that match your chipset/video driver name. For the 945GM one I found two that looked almost identical so I modified both of them. You'll have to decide which ones to change but the "Device Description" key will match your driver name (and like I said, you might find multiple ones)
Under this key there may or may not be an entry called "LidBehavior". If there is check the value. If it's 0x11 then we're going to change it. If it's already 0x10 then you're probably screwed and this blog entry won't help you. If the entry doesn't exist, create it. In any case, we want the value to be a DWORD set to 0x10 hexadecimal (16 decimal). So either add a DWORD value to the "0000" subkey(s) or modify the one that's there.
When the sytem restarts, you can close your lid; wait a minute; re-open it and "voila" it should retain the resolution. "Should" is the key word here as these instructions are pretty black magic (as is most of the registry, and frankly, the operating system in general). Should because this "worked for me" but YMMV. Even if you have the same Dell laptop, OS and drivers that I have this might not work. I'm not going to guarantee anything here.
If it does work for you, you can now happily open and close your laptop without having your resolution change on you. If it doesn't, thanks for coming out and I'll be here all week.