Tutorials-close, Halt, terminate, exitprocess differences

Source: Internet
Author: User


Close:
1. Close this form only
2. When close is a main form, the program exits.
3.Close Formclose event occurs, Formclosequery event
4. Main form close after the program is Application.terminate
5. After the subform is close. You can show it without releasing it.
6. It is also said that the close method of the main window is actually called application's terminate to terminate the program.

Halt:
The Formdestory event occurs to forcibly terminate the execution of the application and return to the operating system (abnormal exit mode).

Application.terminate:
1. is to close the entire program, including all forms.
2.application.terminate above three events will not happen application.terminate is the end of the program.

ExitProcess (0):
1. Direct and clean termination procedures.
2.MSDN Information
Https://msdn.microsoft.com/library?url=/library/en-us/wcekernl/html/_wcesdk_win32_exitprocess.asp

Tutorials-close, Halt, terminate, exitprocess differences

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.