Great topic and one that has been on my list of issue to resolve.
I was pondering the outcome of an programmed resolution change for a deployed app.
If the user had a different resolution and it was changed without warning, I envision every sort of reaction by the users.
Interesting images of these reactions conjur themselves up to me, especially with some potential users I know personally. Pretty amusing I might say.
Short of catching extreme hell from them afterward, I would best alert them ahead of time of the upcoming change. (But then...maybe it would be worth the verbal assault??) I wouldn't do that to a stranger though.
I can figure the enabling code from what was posted earlier, but what code would you reverse the process upon quitting the app?