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. Windows forms and animated gift progress

Windows forms and animated gift progress

Scheduled Pinned Locked Moved C#
winformsalgorithmshelptutorial
7 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.
  • S Offline
    S Offline
    Saamir
    wrote on last edited by
    #1

    Hi guys, Please help! I am trying to show an animated gif on button click. in my click event I have a while loop and until the while loop condition is met I would like to show an animated gif to inform the user that the application is searching... I have tried different methods, threads, a new form with the picturebox and image and all of them show the image but the transition/rotation of the image is not smooth. Please help on how to go about this. Thank you in advance

    Sameer

    C W 2 Replies Last reply
    0
    • S Saamir

      Hi guys, Please help! I am trying to show an animated gif on button click. in my click event I have a while loop and until the while loop condition is met I would like to show an animated gif to inform the user that the application is searching... I have tried different methods, threads, a new form with the picturebox and image and all of them show the image but the transition/rotation of the image is not smooth. Please help on how to go about this. Thank you in advance

      Sameer

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Sounds like your search needs to go into another thread, so that the gif code can run smoothly.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      S 1 Reply Last reply
      0
      • C Christian Graus

        Sounds like your search needs to go into another thread, so that the gif code can run smoothly.

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

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

        Thanks Christian for your response. Can you please give me an example or something, I am quite new to threading. Thanks in advance.

        Sameer

        C 1 Reply Last reply
        0
        • S Saamir

          Thanks Christian for your response. Can you please give me an example or something, I am quite new to threading. Thanks in advance.

          Sameer

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          BackgroundWorker[^] is the class I use for threading.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          S 1 Reply Last reply
          0
          • C Christian Graus

            BackgroundWorker[^] is the class I use for threading.

            Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            S Offline
            S Offline
            Saamir
            wrote on last edited by
            #5

            Thank you Christian. I will give this a shot.

            Sameer

            1 Reply Last reply
            0
            • S Saamir

              Hi guys, Please help! I am trying to show an animated gif on button click. in my click event I have a while loop and until the while loop condition is met I would like to show an animated gif to inform the user that the application is searching... I have tried different methods, threads, a new form with the picturebox and image and all of them show the image but the transition/rotation of the image is not smooth. Please help on how to go about this. Thank you in advance

              Sameer

              W Offline
              W Offline
              wzett
              wrote on last edited by
              #6

              Have you already tried to use the ImageAnimator class?

              S 1 Reply Last reply
              0
              • W wzett

                Have you already tried to use the ImageAnimator class?

                S Offline
                S Offline
                Saamir
                wrote on last edited by
                #7

                no I haven't, it required me to change quite a bit of my code so I have left it for now. I wish there was an easier solution :)

                Sameer

                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