Solved

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

Posted on 2011-03-06
4
1,066 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 500 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

622 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