i have a function which costs plenty of time. this function is an sql-query called via odbc - not written in x++, since the functional range is insufficient.
while this operation is running, I want to show an animation on a form - defined in the aviFiles-macro. trying to realize, several problems occur:
- the animation doesn't start prior the function has finished.
- using threads won't fulfill my hopes, since the odbc-settings are made on the server and i guess, the function is开发者_如何学Python called on client-side.
- besides - how am i able to get the information that the treaded task has ended up?
could anyone give me a hint, how to
- play an animation on a form
- do something ( in background ) and go on playing the animation until the task to perform is finished
- stop the animation
coding this in exactly this order shows the behaviour mentioned above.
thanks in advance for hints and help!
You can use standard AotFind as an example:
- split the work in small pieces each
- piece should be executed at timer tick
Also, you can try not to use timer, but to call infolog.yield() as often as possible.
this could potentially be done in a very complicated way with call backs and delegates if your odbc is in a vs project...
but isn't the real solution to try to find a faster/more effective way to query your data?
精彩评论