about threading
-
Hi all I created a thead and textbox in a class and try to set value of textbox from another created thread. But error comes that Resources held by main thread as TextBoxes are held by main thread. What to do in this case? :confused:
#Abhi#
-
Hi all I created a thead and textbox in a class and try to set value of textbox from another created thread. But error comes that Resources held by main thread as TextBoxes are held by main thread. What to do in this case? :confused:
#Abhi#
Take a look at this article here on CP: What's up with BeginInvoke?[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Hi all I created a thead and textbox in a class and try to set value of textbox from another created thread. But error comes that Resources held by main thread as TextBoxes are held by main thread. What to do in this case? :confused:
#Abhi#
-
Hi, in .NET 1.x you could try it from another thread and it might work (most of the time), or it could result in forms with a white menu bar on top (I'm sure you have seen these already, even on non-.NET code). in .NET 2.0 and up it gets rejected by default; you must set it up in such a way that all controls get handled completely by the thread that created them, often called "the UI thread" or "the main thread". For some simple examples, look at either one of my articles. :)
Luc Pattyn