Linked Questions
470 questions linked to/from How do I update the GUI from another thread?
78
votes
8
answers
196k
views
Writing to a TextBox from another thread? [duplicate]
I cannot figure out how to make a C# Windows Form application write to a textbox from a thread. For example in the Program.cs we have the standard main() that draws the form:
static void Main()
{
...
11
votes
2
answers
81k
views
How to update textbox on GUI from another thread [duplicate]
I'm new with C# and I'm trying to make a simple client server chat application.
I have RichTextBox on my client windows form and I am trying to update that control from server which is in another ...
18
votes
1
answer
4k
views
How to invoke a method on the UI thread from within a worker thread? [duplicate]
I'm working on a project which uses the following technologies:
C# (.NET 4.0)
WCF
PRISM 4
I'm currently making an asynchronous call to one of our Web Services using the Begin/End methods generated by ...
2
votes
5
answers
7k
views
C# thread on forms [duplicate]
Possible Duplicate:
How to update GUI from another thread in C#?
I've currently got a C# program to run a query and display the results in a datagridview.
The query due to size of records takes a ...
1
vote
2
answers
2k
views
How to run code from UI thread in C# [duplicate]
Is there a way to run code in UI thread while calling it outside of it? I know that it basically requires the use of control.Invoke or control.BeginInvoke. My problem is that i don't have access to UI ...
1
vote
3
answers
5k
views
c# threading access to other thread [duplicate]
I have this error: Cross-thread operation not valid: "Control 'progressBar1' accessed from a thread other than the thread it was created on." I can't seem to figure out how to fix it.
private ...
1
vote
1
answer
3k
views
C# - Winforms - Repeating method with help of timer [duplicate]
I recently started learning C#, I am trying to repeat a method every minute with help of a timer. The method changes the value of the label. However, I get the following error:
$exception {"...
4
votes
1
answer
1k
views
BackgroundWorker, update gui, static method [duplicate]
I have app where I'm using background worker to start some sequence.
It needs to update GUI sometimes.
I have static class with references to some gui objects.
In my logic I want to call method from ...
-1
votes
3
answers
2k
views
How to update UI from async routine without BeginInvoke or Invoke [duplicate]
I saw many code that they use BeginInvoke to update UI from another thread. is it possible to update UI from async function without BeginInvoke ?
private async void button1_Click(object sender, ...
-1
votes
2
answers
4k
views
C#: Calling method in another thread [duplicate]
Possible Duplicate:
How to update GUI from another thread in C#?
Following scenario:
I have a class with some GUI elements (winforms). This class has a update method which changes things on the ...
1
vote
2
answers
2k
views
Windows Forms Updating Controls from other threads [duplicate]
Possible Duplicate:
How to update GUI from another thread in C#?
My Timer event crashes because the events are called on a different thread
I have a timer object that I want to periodically ...
0
votes
5
answers
2k
views
How can I refresh a label in Windows Forms from a background thread in C#? [duplicate]
I have a thread that runs in parallel with the Main Form (UI). All it does (for now) is increment a counter every second. I want to display the value of the counter using a label in Windows Forms. ...
-1
votes
3
answers
1k
views
Avoid blocking the form without using Application.DoEvents() [duplicate]
My program displays the time in a timer event and a button starts a function that keeps reading the content of a file until it reaches 50 lines.
The test file is created by a different process that ...
3
votes
1
answer
2k
views
Thread safety when using Aforge.NET and Windows Forms [duplicate]
I'm having a lot of trouble with getting AForge.NET to play together with my Windows Forms application. The application needs a stream of bitmaps to show the video in a custom PictureBox and at the ...
1
vote
2
answers
1k
views
How can I update progress bar without blocking UI? [duplicate]
Currently I am creating a background STA thread to keep the UI responsive but it slows down my function calls on the main thread.
Based on this thread How to update progress bar while working in the ...