Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C# animated GIF stops playing during loop

Posted on 2009-04-09
1
Medium Priority
?
1,708 Views
Last Modified: 2012-05-06
Hi,

I have an animated GIF that is supposed to display whilst a long loop executes (the loop is a Monte-Carlo simulation that lasts around 10 seconds). When I click a button I show a picture box with an animated GIF, whilst the simulation runs.

Unfortunately, when I click the button, the animated GIF stops playing whilst the simulation runs and only starts animating again when the simulation stops!!

Does anyone know of a way to make the animated GIF display whilst the simulation is in progress?

Thanks.
0
Comment
Question by:dg_dibs
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 24112188
Place in your loop(s) a call to "Application.DoEvents();"....


0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question