Solved

C# animated GIF stops playing during loop

Posted on 2009-04-09
1
1,692 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 85

Accepted Solution

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


0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now