Hi

I'm working on a project. i'm using c++ gui windowns forms.
when people press the red cross, then the program need to do something before exiting the program. can someone tell me how to make this. what event I need to use.

thanks in advance

Go to the designer and select your form. Go over to the properties window and select the lightning bolt (to get the events). Find "Form closing" (not "Form closed") and double click the cell to the right of it. This will put the event handler code into your Form1.h and you can flesh that out as you see fit.

thanks this is very good