Solved

Background thread is locking animated gif in windows form

Posted on 2011-03-22
1
592 Views
Last Modified: 2012-05-11
Hello experts,
I have created a windows form in vs 2008, that is multi threaded.  When the heavy work is being performed I would like the form to display an animated gif.  I have added the animated gif to a picure box and i use a backgroundworker control to handle the heavy work.  The animated gif just locks up until the backgroundworker control has finished.  I have no idea why this isnt working.  I have tried building my own background threads using delegate calls and invokes and the same thing happens.  I added the code below is there something else i can do.
Private Sub Quality_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
pb_drawing.imagelocation = "animated.gif"    'I tried doing this and also set the property before the form loads still doesnt work  
  Me.Cursor = Cursors.WaitCursor
            bgworker.RunWorkerAsync()
End Sub


 Private Sub bgworker_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgworker.DoWork
  build_drawing_file 'this process takes a while
End Sub

Open in new window

0
Comment
Question by:tentavarious
1 Comment
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 250 total points
ID: 35193720
What is happening in DoWork()?...this is key!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

20 Experts available now in Live!

Get 1:1 Help Now