c++buildervclc++builder-2010tgifimage

Keep one form updating even if another is working


I created a small form that I want to put on top of other forms when they are working. Basically like a small "Loading... Please wait" notification. It includes an animated TGIFImage. The problem is that when another form is working hard the animation and updating of this form stutters. Probably since they are running in the same thread? Is there a quick and easy way to have this little form always update nicely? Perhaps a quick way to make sure it's handled in it´s own thread?


Solution

  • Thanx for the answer Remy Lebeau. I wanted to have to change as little as possible to the existing code though and not move existing code into threads etc. So what I ended up doing was to have a little factory for my notifications that spawns a thread and create the form in that thread. That way I basically only need to wrap my existing code with a Show and a Hide call.