Solved

C# animated GIF stops playing during loop

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

760 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

23 Experts available now in Live!

Get 1:1 Help Now