So I'm going to be writing an IT test tomorrow and we code using Delphi. My IT teacher hinted that one of the questions would involve us using code that would terminate the program if the user leaves the checkbox blank. Just wondering how I would go about doing this in Delphi.
CodePudding user response:
Look at Application.Terminate()
. Or, simply close the MainForm
, the app will terminate automatically.
CodePudding user response:
You may also use FatalExit(0); This command is available for VCL application.
thanks
CodePudding user response:
Another possibility to terminate the program is the halt
command. But one should use this command very very rarely!