delphi close the program Close, application.Terminate and halt the difference

When Close is a main form, the program exits.
Close FormClose events occur, FormCloseQuery event
Halt FormDestory events occur,
Application.Terminate these three events will happen

Application.Terminate program is ended. The whole program finishes running, the system forced recovery of system resources 
when the main window is closed or WM_QUIT message triggers, Terminate is called automatically
close, only for the form. After the main form close Application.Terminate the program. 
After the child form close. No release, you can Show it. 
Close method is to say the main window is actually calling the Terminate Application terminate program
Application.Close is normal exit, take the initiative to have the application return system resources 

in addition there is a difference, the Close method of the main window can trigger OnClose event 
and Application.Terminate and It does not trigger the event.

Guess you like

Origin www.cnblogs.com/jijm123/p/11304965.html