I need to show an animated gif, which I retrieve as a BLOB from a database (rather than a file), on a PictureBox, but I can't block the UI. The user can press a button that stops the referred animation.
So I create a UserControl that contains the PictureBox, where I can set the image to be shown. When I put this control on the form and starts the animation, everything occurs as expected, except for the fact that I can't press the button, 'cause the form is blocked.
When I start the animation from a Thread, the button are enabled and clickable, but in this case the animation "flickers".
I can easily change the PictureBox to another component, since it can show animated gifs. I can also transform the animated gif to some other format, if needed...
Note that
- My images are animated gifs that came from BLOB's on a database and not normal files
- I do not want (in fact, It's forbidden, by requirements) create a file with the images (even a temporary file)
Any thoughts?