I thought about that, but you specifically asked about the Close button.

What exactly do you want to do? Will you be testing for specific values in UnloadMode?