How do you change where new windows in Windows XP open?

Many programs will remember their last position automatically, if they don't, sometimes holding control as you click the X to close it will force it to remember that position.