?
Solved

how to show an animated wait GIF or AVI while long job is running in vb.net

Posted on 2011-03-06
4
Medium Priority
?
1,076 Views
Last Modified: 2012-05-11
I added a GIF image in a picturebox to the windows form I am creating, however, it does not refresh continuously while a long job is executing. I have searched in the web, and developers advise to use AVI instead, I want to show the animation, whether by avi or gif. Can someone send me the VB.Net code to do this? Thanks
0
Comment
Question by:fmichail
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 35046949
It doesn't matter if you use gif or avi...the problem is the "while a long job is executing" part.  You need to move that job to another thread so the main UI thread is free to do the animation.

The easiest solution is to use the BackgroundWorker() control:
http://msdn.microsoft.com/en-us/library/8xs8549b.aspx
http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker(VS.80).aspx
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 35047233
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 35047254
That's a pretty control emoreau!

*It too, though, would not work if the author doesn't move the work to a different thread:
it does not refresh continuously while a long job is executing.
0
 

Author Closing Comment

by:fmichail
ID: 35047445
Thanks Idle_mind.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

719 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