Hi,
I have a problem with my windows app. It doesn't work sequential.
Example:
There is a "Memo" - element and in there is a result from a earlier calculation.
Now another procedure is called.
At first I want to put a 'please wait' into the memo
procedure TForm1.ListBox1DblClick(Sender: TObject);
var
newresult:String;
begin
Form1.Memo1.Text:='Please wait';
...// a lot of calculation User has to wait some seconds and at the end there is a new result
Form1.Memo1.Text:= newresult;
end;
But when I run the app and call the procedure it doesn't insert the 'please wait' into the memo before big calculation starts.
It just change the Memo1 when the newresult is there and the user saw the old result in memo during the calcalation.
It works so:
1. precedure is called
2. calculation
3. put 'Please wait' in Memo
4. put new result in Memo
That's wrong!
If I insert a "ShowMessage ('Hello');" into my code it works well.
procedure TForm1.ListBox1DblClick(Sender: TObject);
var
newresult:String;
begin
Form1.Memo1.Text:='Please wait';
ShowMessage('Hello');
...// a lot of calculation User has to wait some seconds and at the end there is a new result
Form1.Memo1.Text:= newresult;
end;
That works as it should
1. precedure is called
2. put 'Please wait' in Memo
3. ShowMessage
4. calculation
5. put new result in Memo
How can I solve that without to use a "ShowMessage" ?