CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    1

    Question stop an animated gif

    hi. i'm trying to find a way to stop an animated gif from replaying in C#. it appears that there's no way to just stop it when it loads the last frame. i've already tried the getframecount method and then onPaint() i'd increase a current_frame_count variable until it reaches the frame_count and then i'd disable the image.

    private void Label_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
    {
    currentFrame++;
    if(currentFrame.CompareTo(frameCount) == 0)
    {
    this.Innisfree_Logo.Enabled = false;
    }
    }

    now that works, but only if the system that's running doesn't stall for a sec or runs anything heavy. and that's the problem. i can't have this image stoping on a different spot just cause the system runs a little heavier. (the reason it stops is cause a gif runs on a framedimension.time type, not page). i need a better and safe method to actually stop the gif image on the last frame. if anyone can help, this would be great. thanks.

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    actually GIF architecture is diff. since it has layers which can be merged. so try looking its details in Adobe first (or gif modifier s/w) then fetch for the frame image and show that out.

    may be that can work,
    just a thought though

    Paresh
    - Software Architect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured