"X" button closing the window

Blitz3D Forums/Blitz3D Programming/"X" button closing the window

I would have searched for this but the search appears to be down right now.

Is there a way to detect, in Blitz3D, that the user has clicked the red "X" button in the top right corner? I'd love to catch that event and save their game if possible...