473,382 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

animated gif stop looping

I have an animated gif playing fine in a picture box. However, I don't
want it to keep looping, I only want to play it twice. I found some
code that gets the active frame and loads it looping through, but I
cant get it to work. With this code, it didn't do any animation.

I found this:

For f = 0 To animatedGif.GetFrameCount(frameDimension) - 1
animatedGif.SelectActiveFrame(frameDimension, f)
Dim memoryStream As New System.IO.MemoryStream
animatedGif.Save(memoryStream,
System.Drawing.Imaging.ImageFormat.Bmp)
PictureBox2.Image =
System.Drawing.Image.FromStream(memoryStream)
Application.DoEvents()
Threading.Thread.CurrentThread.Sleep(100)
Next

TIA,
Mark

Nov 21 '05 #1
0 3214

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kwok Ng | last post by:
Hi folks, In IE, the animated gif will stop after the form is submitted. I even put the animated gif in the iframe, still no luck. Would anybody know any workaround? Thanks! Billy Ng
2
by: ctrl+alt+delete | last post by:
I have a DIV on my webpage that is set to be hidden (style="display: none"). Within the DIV is an animated gif that's simply a graphic that simulates data flowing from the clients PC to the server....
0
by: Michael Ramey | last post by:
A PictureBox Image property is set to a non-looping animated GIF file. However, the GIF continually loops. How can I stop the animated GIF from looping in a PictureBox? Thanks. Michael
3
by: Al | last post by:
Hi all... I have created an aspx page that contains an animated GIF. I am using javascript and location.replace to redirect from this page to another aspx page which takes several seconds to...
3
by: Altman | last post by:
I have a object that contains a check box. When the value changes it raises an event for that object. I then have another object with a animated gif in it. I linked the event of the first object...
4
by: Chris Moltisanti | last post by:
Hi, I am executing a piece of javascript that does some intensive processing (sorting large tables). This can take a good few seconds so I have an animated gif as a progress bar to let the user...
4
by: Jeff | last post by:
Hi, I'd like to write Javascript that stops animated gifs from animating. On Firefox, at least, window.stop(); does the trick, although it stops everything on the page and is kind of...
7
by: Lemune | last post by:
Hi.. I am developing an application that connect to database on the other side of the net. And each time i want to connect to database and run some sql command, i want my user to know that there...
1
by: NickP | last post by:
Hi there, I've made a few animated controls but would like to check on the correct procedure for doing so as unfortunately every now and then, without warning, I recieve a GDI+ Exception stating...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.