Click to See Complete Forum and Search --> : how to set txtTextBox from within a class?


cgchris99
April 10th, 2002, 12:16 PM
I am creating a class that will be started in it's own thread.

I am just doing the testing right now.
I have the class setup with a Do Loop that never ends.
And in this loop I increment a counter.

I want to do txtTextBox4.Text = lngCounter

But this doesn't work. It displays an error txtTextBox4 not declared.

How can I do this?

Thanks

Craig Gemmill
April 11th, 2002, 02:45 PM
You have the use the right namespace (where the textbox is declared) before the textbox can be used outside of its own class. So if the textbox is on Form1 then.


Form1.txtTextBox4.Text = lngCounter




Good luck