5
Reply

Accessing control from another class and thread

Simon

Simon

Jul 4 2010 6:58 AM
3.7k
Hi there,

I could use some help with the following issue:
I have a Form which has a public TextBox member... that form loads up a new thread which is defined in a separate class.
The thread has a constant loop in it.. and I need to update the textbox on my form with messages obtained at the end of each cycle in that loop.. in C++ that would be easy with just passing a few pointers when I create the thread class.. but in C# I have to enagle unmanaged code and still I can't really pass the textbox as a pointer... so I'm looking for some other solution if there is one.. (tried messing with the ActiveForm and such but can't really get it going)

Any quick help would be awsome.. :P 
Thanks 

Answers (5)