[Overview][Types][Classes][Variables][Index] Reference for unit 'CustApp' (#fcl)

TCustomApplication.Terminate

Terminate the application.

Declaration

Source position: custapp.pp line 67

public procedure TCustomApplication.Terminate; virtual;

procedure TCustomApplication.Terminate(

  AExitCode: Integer

); virtual;

Arguments

AExitCode

  

Exit code for the program

Description

Terminate sets the Terminated property to True. By itself, this does not terminate the application. Instead, descendent classes should in their DoRun method, check the value of the Terminated property and properly shut down the application if it is set to True.

When AExitCode is specified, it will passed to System.ExitCode, and when the program is halted, that is the exit code of the program as returned to the OS. If the application is terminated due to an exception, ExceptionExitCode will be used as the value for this argument.

See also

TCustomApplication.Terminated

  

Was Terminate called or not

TCustomApplication.Run

  

Runs the application.

ExceptionExitCode

  

ExitCode to use then terminating the program due to an exception

System.ExitCode


Documentation generated on: Sep 28 2017