Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
procedure Halt;
Terminates a program abnormally.
Halt stops the program and returns to the operating system. To perform a normal termination of Delphi VCL non-console application, call Application.Terminate.
//if the non-numeric key is pressed exit the program!
procedure TForm1.Edit1KeyPress
(Sender: TObject; var Key: Char);
begin
if not (key in ['0'..'9']) then Halt;
end;
|
|
Free Delphi code snippet inside every Delphi Newsletter! |
|
|
|
Got some code to share? Got a question? Need some help? |
|
|