using LocalAsyncVclCall in Delphi
Posted
by Salvador
on Stack Overflow
See other posts from Stack Overflow
or by Salvador
Published on 2010-04-01T16:19:59Z
Indexed on
2010/04/01
16:23 UTC
Read the original article
Hit count: 353
delphi
Actually i am using the AsyncCalls library to execute an Query asynchronously in this way.
while AsyncMultiSync([RunQuery], True, 10) = WAIT_TIMEOUT do
begin
FrmProgress.refresh; //Update the ellapsed time in a popup form
Application.ProcessMessages;
end;
and everything works ok.
Now i want to do the same for load the query in a grid.
so i tried this
while LocalAsyncVclCall(@InitGrid, 10) = WAIT_TIMEOUT do
begin
FrmProgress.refresh;
Application.ProcessMessages;
end;
but obviously not compile because the type returned by LocalAsyncVclCall is IAsyncCall
and not a Cardinal.
also i tried this, but not works.
while not LocalAsyncVclCall(@InitGrid, 10).Finished do
begin
FrmProgress.refresh;
Application.ProcessMessages;
end;
How i can use LocalAsyncVclCall or another function to execute an VCL code asynchronously .
i want something like this.
while ExecuteMyVCLProcedure(@InitGrid) = WAIT_TIMEOUT do
begin
FrmProgress.refresh;
Application.ProcessMessages;
end;
Thanks in advance.
© Stack Overflow or respective owner