To display a form or a "please wait" panel while executing a task in FMX Delphi 10.2, you can follow these steps:
Example:
Assuming you have a "frmPleaseWait" form with a "lblMessage" label, and your processing function is "ExecuteTask":
procedure TForm1.ExecuteTask;
begin
try
frmPleaseWait.lblMessage.Text := 'Processing...'; // Update the message displayed in the "please wait" form.
frmPleaseWait.Visible := true; // Show the "please wait" form.
// ... perform your task ...
finally
frmPleaseWait.Visible := false; // Hide the "please wait" form after the task is completed.
end;
end;
You can then call this function wherever you need it in your application, for example:
procedure TForm1.btnProcessClick(Sender: TObject);
begin
ExecuteTask;
end;
This will display the "please wait" form while the task is executed, and hide it afterwards.
Asked: 2022-01-16 11:00:00 +0000
Seen: 9 times
Last updated: Dec 30 '21