views:

85

answers:

1

Hi folks,

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 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!

A: 

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.

AxCoder