Author Topic: WinForms - Fix for Cross-thread operation not valid:Control 'txtBox1' accessed  (Read 2425 times)


  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
When you write C# winforms application with multithreading you may encounter the most common issue:

An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll

Additional information: Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on.

You need to make calls through the main thread it was created on using invoke method:

Refer to the link for example:


Disclaimer: This web site is for educational and informational purposes only. Click here to read the Disclaimer.
Content copyright 2010-2014. Kathiresan. All rights reserved.
This page is using SMF version 2.0.1