• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1711
  • Last Modified:

C# animated GIF stops playing during loop

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
dg_dibs
Asked:
dg_dibs
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Place in your loop(s) a call to "Application.DoEvents();"....


0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now