Board index » cppbuilder » Form Close
Andrés de la Cuadra
![]() CBuilder Developer |
Andrés de la Cuadra
![]() CBuilder Developer |
Form Close2007-02-01 06:22:24 AM cppbuilder20 I put some code inside OnClose event in the main form. The code Action = caFree works fine when the form was closed by the user, but it doesn't finish when the form was closed using Close(); inside the program. In both cases the event is called, but in the second case it does not end the program until the user close it clicking in the upper right corner of the window. Any idea? |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2007-02-01 09:15:14 AM
Re:Form Close
"Andrés de la Cuadra" < XXXX@XXXXX.COM >wrote in message
QuoteI put some code inside OnClose event in the main form. QuoteThe code Action = caFree works fine when the form was message to the main message queue. The form is freed when the message is processed later on. QuoteIn both cases the event is called, but in the second case it In any case, if you want to ensure that the program ends, you should be calling Application->Terminate() instead of Close(). Quoteuntil the user close it clicking in the upper right corner of the Gambit |
Hans Galema
![]() CBuilder Developer |
2007-02-01 04:35:44 PM
Re:Form Close
Andrés de la Cuadra wrote:
QuoteI put some code inside OnClose event in the main form. Hans. {smallsort} |