Invoke/Thread Error
-
I get the following when trying to build a tree from the following code: The action being performed on this control is being called from the wrong thread. I thought I was using the correct BeginInvoke. Thanks for any help! private void main() { ... SetRunCollectionTree srct = new SetRunCollectionTree(this.RunCollectionTree); srct.BeginInvoke(null, null); } public delegate void SetRunCollectionTree(); public void RunCollectionTree() { try { this.collectionTree.BuildTree(); } catch(System.Exception e) { MessageBox.Show(e.Message); } }
RABB17 "Nothing fancy needed, please just solve all our problems as quickly as possible."
-
I get the following when trying to build a tree from the following code: The action being performed on this control is being called from the wrong thread. I thought I was using the correct BeginInvoke. Thanks for any help! private void main() { ... SetRunCollectionTree srct = new SetRunCollectionTree(this.RunCollectionTree); srct.BeginInvoke(null, null); } public delegate void SetRunCollectionTree(); public void RunCollectionTree() { try { this.collectionTree.BuildTree(); } catch(System.Exception e) { MessageBox.Show(e.Message); } }
RABB17 "Nothing fancy needed, please just solve all our problems as quickly as possible."