Solved

C# animated GIF stops playing during loop

Posted on 2009-04-09
1
1,695 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 500 total points
ID: 24112188
Place in your loop(s) a call to "Application.DoEvents();"....


0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mobile apps - web/native or hybrid? 1 75
Problem to copy file 14 54
CSS - Centering an image 2 28
ComboBox to String Not Working 5 21
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
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
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…
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.

730 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