December 27th, 2012, 03:41 PM
Basic Threading Problem
I just want a label to show a loading message before executing a bunch of code. I wrote this:
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?
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));
Last edited by BioPhysEngr; January 2nd, 2013 at 11:53 PM.
Reason: code tags
Click Here to Expand Forum to Full Width