Hi,
I have program, creating multiple threads, and each thread is updating
the same richtextbox(appending to previous text), and text in the
statusbar.
To update the richtextbox and statusbar, I am using delegates.
At some point in time the text in the richtextbox is being cleared off.
Also, at some point and infrequently, the following error is being
given:
"An unhandled exception of type 'System.InvalidOperationException'
occurred in mscorlib.dll
Additional information: Unable to set the panel text."
Below is the method where the error just given is being given.
string text = "MyText....."
AddTextDelegate atd = new AddTextDelegate(AddText_rtbActions);
IAsyncResult iar = atd.BeginInvoke(text, null, null);
atd.EndInvoke(iar);
UpdateCounterDelegate ucd = new
UpdateCounterDelegate(DecrementEventsExecuted);
iar = ucd.BeginInvoke(null, null);
ucd.EndInvoke(iar);
Can someone help me out
Thanks in Advance