My application has an "Are you sure...?" prompt in "Form_QueryUnload".

The trouble with this is if windows is shutting down, this prompt gets in the way.

Can I detect that windows is shutting down so that I can remove this prompt from the procedure?
This must work on both win2k and win98.
Thanks,
John