Background Worker Delphi

混江龙づ霸主 提交于 2019-12-02 07:57:55

BackgroundWorker is not much more than a thread implementation. But there are a Components that emulate this behaviour on Delphi, such as TBackgroundWorker

Tested with TADOQuery for "select" request.

1) Change "ExecuteOptions" "eoAsyncExecute" and "asAsyncFetch" to True

2) Use event "OnFetchProgress" for determinate, does async request was completed. If "Progress" = "MaxProgress" then async request completed.

Tested with Delphi 2007 and 2009.

You may try a well-respected AsyncCalls unit. It is not more developed after Delphi 2009 was released, but you don't use it anyway.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!