Tom

Tom

  • NA
  • 3
  • 0

Threading to refresh my screen

Dec 11 2010 7:28 AM
Hello,

I am trying to make a screen in visual studio 2010 with a few textboxes.
I want to make the text in the textboxes switch a few times when you hit a button.
So for example:
"textbox1" with text "123"
"textbox2" with text "456"
and when you hit the button 123 goes in textbox2 and 456 goes in textbox1
and this a thousand times or so. But at this moment it does the job but the user can't see it.
I read on forums I have to use threading to let the textboxes switch text and in the button I can do a refresh of the screen.

But my problem is when I use threading I need to make my method to let the textboxes switch static.
And when I do this the compiler gives me an error because when I use textbox1.Text = "..." the textbox1 isn't static so I can't use it this way.

How can I solve this problem?

Thanks in advance.

Answers (2)