The difference between Delphi Close, Halt, terminate, ExitProcess is

Close:
1. Turn off the only form
2. When Close is a main form, the program exits.
3.Close FormClose events occur, FormCloseQuery event
after the main form 4. close the program Application.Terminate
5. subform close later. No release, you can Show it.
6. Close method is to say the main window is actually calling the Terminate Application terminate the program.

The HALT:
FormDestory events occur, for executing the forced termination of the application, return to the operating system (non-normal exit strategy).

Application.Terminate:
1. closed whole program, including all forms.
2.Application.Terminate these three events will not occur Application.Terminate program is ended.

The ExitProcess (0):
1. Direct clean termination procedures.

Guess you like

Origin www.cnblogs.com/guorongtao/p/11504253.html