My application shows another form (FormB) with "Modal " by selecting a menu option in main form (FormA).

In Form B, is that any event (preferably single event) that can catch the following sitatuion:
- form close by pressing a command button with FormB.unload;
- form close by pressing the cross at right top corner.

I can catch the command button close event but not the later and I prefer a single event to catch both of them so that I can update the status value in FormA.

Thank you.