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

Recommended Answers

All 2 Replies

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.