Hi, Dear all,

I am confusing about how to capture the event when I close a MDI application using the "X" button on the top-rihgt corner of the window.

The whole thing I want to do is like this: just like any windows application, if a document is dirted, I want to pop out an message box when closing the application, say, yes, no, and cancel. And I am trying to capture this event in MDIForm_Unload, but it seems that the window will always be unloaded.

Thank you for your help to a beginner in VB.

Yuren

love programming!