Recent

Author Topic: [SOLVED] How can I display message form while doing others?  (Read 232 times)

egsuh

  • Sr. Member
  • ****
  • Posts: 433
Is it possible to display a messagebox or form while processing something else, for example downloading a file from webserver, etc.?
One way would be that the operation is done at the modal form itself, but I'm wondering there are other ways to do this.
Actually I think this is something like asynchronised processing in javascript.
« Last Edit: June 04, 2020, 11:37:58 am by egsuh »

egsuh

  • Sr. Member
  • ****
  • Posts: 433
Re: [SOLVED] How can I display message form while doing others?
« Reply #1 on: June 04, 2020, 11:38:33 am »
I solved this issue in following ways.

Code: Pascal  [Select][+][-]
  1. procedure TfQEdit.MenuItem10Click(Sender: TObject);
  2. begin
  3.    if sd1.Execute then begin
  4.        msgForm.Label1.Caption := 'Downloading data... Please wait';
  5.        msgForm.BorderIcons := [];
  6.        msgForm.FormStyle:= fsStayonTop; // fsSplash;
  7.        msgForm.Show;
  8.        Application.ProcessMessages;
  9.        Qnnr.ExportData(sd1.filename);
  10.        msgForm.Hide;
  11.    end;
  12.    ShowMessage('Data saved');
  13. end;
  14.  

 

TinyPortal © 2005-2018