I also have this problem a lot (windows 7);
Ill have Chrome or Acrobat open on my second display when docked at work.
I sleep the machine, undock and head home. When I open it up, chrome or acrobat still maximizes to the now disconnnected second screen.
I have no way to get it back. FN+F8 for projector control does nothing. neither does resleep or hibernate. Closing chrome doesnt work because it re-opens in the same place as last time. Only a reboot fixes this problem.
I hate rebooting my machine. I go many weeks without rebooting and this always pisses me off.
It would be better if you could right-click an app on the task bar and say "send to primary screen" or "send to secondary screen"
there used to be this option, but only some-times, and I don't know why/where to find it.