Basic Threading Problem
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Basic Threading Problem

Threaded View

  1. #1
    Join Date
    Dec 2012
    Posts
    1

    Basic Threading Problem

    I just want a label to show a loading message before executing a bunch of code. I wrote this:
    Code:
            private void LoadQueue()
            {
                displayRangeAuditLabel.Visible = false;
                sortByComboBox.Visible = false;
                showLateCheckBox.Visible = false;
                lblQueueLoading.Visible = true;
    
                if (LoadingThread != null && LoadingThread.IsAlive) LoadingThread.Abort();
    
                LoadingThread = new Thread(new ThreadStart(BindAuditQueue));
                LoadingThread.Start();
            }
    This works and displays my label about half the time - the other half, it only grays out the background area of the label. I suck at threads. What's wrong?
    Last edited by BioPhysEngr; January 3rd, 2013 at 12:53 AM. Reason: code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center