You will need to use Control.Invoke method like this:
textbox1.Invoke((MethodInvoker)(() =>
{
textbox1.Text="some text";
}));
Check this article too: Threading in UIs
More Related Contents:
- Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on
- How to stop BackgroundWorker on Form’s Closing event?
- Automating the InvokeRequired code pattern
- WinForm Application UI Hangs during Long-Running Operation
- Question about terminating a thread cleanly in .NET
- How do I update the GUI from another thread?
- Cross-thread operation not valid [duplicate]
- How to update GUI with backgroundworker?
- Multi-threaded splash screen in C#?
- How to kill a thread instantly in C#?
- How to invoke a UI method from another thread
- Force GUI update from UI Thread
- How to update textbox on GUI from another thread [duplicate]
- Run two winform windows simultaneously
- Running a method in BackGroundWorker and Showing ProgressBar
- Run multiple UI Threads
- Accessing a form’s control from a separate thread
- COM object that has been separated from its underlying RCW cannot be used
- Getting Cross-thread operation not valid [duplicate]
- Show Loading animation during loading data in other thread
- C# Windows Forms Application – Updating GUI from another thread AND class?
- Solve a cross-threading Exception in WinForms
- Multiple UI Threads – Winforms
- How to exit all running threads?
- InvalidOperationException – object is currently in use elsewhere – red cross
- Populating a DataGridView with Text and ProgressBars
- Update label from another thread [duplicate]
- Why does the inner exception reach the ThreadException handler and not the actual thrown exception?
- Is it good idea to use “Control.CheckForIllegalCrossThreadCalls = false” [duplicate]
- Draw on a form by a separate thread