Modal form's close event

From: Beeeeeeeeeeeeves (Beeeeeeeeeeeeves_at_discussions.microsoft.com)
Date: 07/22/04


Date: Thu, 22 Jul 2004 08:19:19 -0700

What when a *modal* form has a Show vbModal method, and wants to capture an event on the cancel button.
Fine - I can include a click event handler for the cancel button, and set the bOK variable to false so when the Show method returns, it will know that the form was cancelled (the cancel event has to have a few other cleanup routines in it also)

I can prevent the user closing the form by not having a control box, but what if I want to have a control box with no max min, just the cross in the top right - BUT I want exactly the same thing to happen when the user clicks that, as if they click the cancel button!

What event must I use????? There isn't a form_close. Will Terminate event fit the needs of this?

*MUST * BE a modal form
Thanks