Interrupt main app, while executing control

May 24 2004 12:31 PM
Hi there. I'm working on a app that needs to animate gifs. So, I've created a costum control to execute the params needed to this operation... The problem is that I can't stop the main app, while the gif is "playing". What happens is that the control where the gif is processing is being refreshed, but the main code, the one that called the app doesn't wait until the end of the gif. It's something like: // Loads the image animaGif.CarregaImagem(Image.FromFile(Environment.CurrentDirectory+"\\Imagens\\BolaCanhao.gif")); // Starts the animation animaGif.Start(posX*17, posY*17); // Should wait until the animation ended, what doesn't happen.. it just continues The ideal was to implement a flag to extend the usibility of the control... like in WinMM PlaySound, where there is a flag to play the sound sync/async, and when Sync is activated the app waits until de sound is over. Regards, David Sanguinetti

Answers (4)