latika singh

latika singh

  • NA
  • 31
  • 24.2k

Thread safe calls to windows forms controls

Aug 3 2011 9:55 PM
I have a text box that constantly updates value coming in from a serial device. When I compile the code and build the project in .exe format everything works fine. But when I run the project from the VS 2008 environment then it displays a message box saying that the control 'textbox' accessed from a thread other than the thread it was created.

Can anyone make suggestions to the problem. It points to the following line in the code:
Me.tReading.Text = Format(reading, "#0.00000")

Answers (2)