When the user clicks on the "QUIT" button, I would like the app to display a caption for several seconds and quit the application. Here is the procedure I used.
procedure TForm1.ButtonQuitClick(Sender: TObject);
LabelBye.Caption := 'Goodbye Benjamin';
Sysutils.sleep(2000);
Application.Terminate;
end;
Swapping the "sleep" and "label" instructions has the same output. I've tried "wait" and "delay" with the same results.
What do I need to change to get the caption to display for more than a few milliseconds before termination?