473,761 Members | 10,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Get FrameCount(fram eDimension) - 1
animatedGif.Sel ectActiveFrame( frameDimension, f)
Dim memoryStream As New System.IO.Memor yStream
animatedGif.Sav e(memoryStream,
System.Drawing. Imaging.ImageFo rmat.Bmp)
PictureBox2.Ima ge =
System.Drawing. Image.FromStrea m(memoryStream)
Application.DoE vents()
Threading.Threa d.CurrentThread .Sleep(100)
Next

TIA,
Mark

Nov 21 '05 #1
0 3225

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

Similar topics

1
3603
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
5357
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. This a form page (self-submitting). When the user submits the form, I have some Javascript that sets the DIV to be displayed. The problem is that the animated gif does not "play". It's displayed in it's static state. WHY? And if I used a Flash...
0
2352
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
3443
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 load. When location.replace is called the animated GIFs in the first page stop animating. Is this standard behaviour? If so, is there an easy work around to prevent this?
3
6743
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 to change the visible property of the animated gif in the second object. If I click on the checkbox to change it, all works fine. But if I try to change it programatically, (through a timer thread) the image shows up but it does not move. How...
4
8051
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 know that something is happening. However, the GIF does not animate when the javascript is processing. Anyone know why? I am aware that animated GIFs stop animating when a page is loading, but I am not loading the page here.
4
6364
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 unpredictable. If I connect it to the onload event, sometimes only half the page will be displayed. Does the onload even fire before rendering? Does anyone know a reasonable way to accomplish my original goal of
7
14533
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 is some process is runing. My idea is to show animated gif until the process is done. My question is how i could achieved that? Any one could give me a clue or hint or even sample code? Thank you? This is my snippet code:
1
1701
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 that the graphics object is kin use elsewhere. Basically my user control has the following styles set, AllPaintingInWmPaint and UserPaint. When my control recieves a string array it starts scrolling each string in the array in a marquee...
0
9521
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10107
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9900
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3863
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.