animated gif
-
Hi, In my winform, I have a blocked call to dll that takes a while to return. I wanted to show to the user a progress bar like to indicate that some process is going on behind and they should wait until its finished. So, I added an aminated gif image to indicate the progress. But the animation won't happen when the call is blocked and until it returns. This is because its on the same thread. I know threading will solve my problem, but I dont want to put the blocking code inside another thread since it involves lot of UI updates. Is there any way to put the animated gif inside another thread and make it to animate while the dll code is executed, or alltogether different solution to make this thing work. Thanks in advance.
-
Hi, In my winform, I have a blocked call to dll that takes a while to return. I wanted to show to the user a progress bar like to indicate that some process is going on behind and they should wait until its finished. So, I added an aminated gif image to indicate the progress. But the animation won't happen when the call is blocked and until it returns. This is because its on the same thread. I know threading will solve my problem, but I dont want to put the blocking code inside another thread since it involves lot of UI updates. Is there any way to put the animated gif inside another thread and make it to animate while the dll code is executed, or alltogether different solution to make this thing work. Thanks in advance.
No, there isn't. If you put the blocking call on the UI thread AT ALL, no UI updates will happen until that call returns. You're only choice is to put the long workload in it's own seperate thread and rewrite it so it doesn't do ANY UI updates. It can, however, be written to fire off events that the UI thread can subscribe to. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Hi, In my winform, I have a blocked call to dll that takes a while to return. I wanted to show to the user a progress bar like to indicate that some process is going on behind and they should wait until its finished. So, I added an aminated gif image to indicate the progress. But the animation won't happen when the call is blocked and until it returns. This is because its on the same thread. I know threading will solve my problem, but I dont want to put the blocking code inside another thread since it involves lot of UI updates. Is there any way to put the animated gif inside another thread and make it to animate while the dll code is executed, or alltogether different solution to make this thing work. Thanks in advance.