Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. animated gif

animated gif

Scheduled Pinned Locked Moved C#
designhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Manu_81
    wrote on last edited by
    #1

    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.

    D S 2 Replies Last reply
    0
    • M Manu_81

      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.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • M Manu_81

        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.

        S Offline
        S Offline
        shabonaa
        wrote on last edited by
        #3

        how can i open gif files?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups