Sunday, April 3, 2011

How can I do a form with an image spinning in Delphi?

Like those we see in website. And where do I get the images?

From stackoverflow
  • Go to ajaxload to generate an image. Then find a delphi gif image component. Try here for a start.

    Nick Hodges : As of Delphi 2007, TImage provides GIF image support.
    Ulrich Gerhardt : You can also use software like AniTuner to convert the gif to an avi that you can use in a TAnimate.
    onnodb : +1 for the AniTuner tip; thanks!
    Craig Stuntz : Delphi's GIF image support already does animations.
  • The "spinning images" are usually animated GIFs. Do a google search for the phrase in quotes to learn about them, and you should also find software that will help you create them as well. Support for them has been included in Delphi for a couple of years now.

    If animated GIFs aren't good enough, you can look into AVI files. They're what Windows uses to show files being copied, folders being scanned, and other things. TAnimate is the Delphi component that supports them.

  • I do suggest running your "work" in a separate thread. AsyncCalls is a good library which works well for helping you get there easily. Tight loops or blocking calls can cause your animation to look jumpy or stop completely.

0 comments:

Post a Comment