Cross thread error, but not using threads
I keep getting
Cross-thread operation not valid: Control 'keyholderTxt' accessed from a
thread other than the thread it was created on.
on various controls on various forms in a project, and I have googled it
and found lot's of responses about how to access stuff from various
threads, but as far as I know, i'm not using any other threads in my
project, and to change the hundreds of possible places in the code would
be unmanageable.
It never used to happen, only since I added various code that seems
unrelated. I include a sample of places where I get the errors below, but
it has occurred in so many places all over the solution.
keyholderTxt.Text = "Keyholders Currently In:\r\n \r\n Nibley 1: +
keyholders";
or this
txtIdentify.Clear();
Can things like not closing datareaders cause this kind of error?
I am using a Windows Forms Application.
No comments:
Post a Comment