Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Background thread is locking animated gif in windows form

Posted on 2011-03-22
1
Medium Priority
?
608 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
[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
1 Comment
 
LVL 86

Accepted Solution

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

670 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