You could use a BackgroundWorker and then change the UI like this:
control.Invoke((MethodInvoker)delegate {
control.Enabled = true;
});
More Related Contents:
- How do I update the GUI from another thread?
- Cross-thread operation not valid [duplicate]
- Updating GUI (WPF) using a different thread
- How to update textbox on GUI from another thread [duplicate]
- Multiple UI Threads – Winforms
- Does MessageBox.Show() automatically marshall to the UI Thread?
- Why does this Parallel.ForEach code freeze the program up?
- Maximum number of threads in a .NET app?
- Is the C# static constructor thread safe?
- Implement C# Generic Timeout
- When to use BlockingCollection and when ConcurrentBag instead of List?
- Attempted to read or write protected memory. This is often an indication that other memory is corrupt
- Why is cross thread operation exception not thrown while running exe in bin\Debug
- Is accessing a variable in C# an atomic operation?
- Multiple Parallel.ForEach loops in .Net
- Is there a way to indefinitely pause a thread?
- How to put a task to sleep (or delay) in C# 4.0?
- Task continuation on UI thread
- Async/Await vs Threads
- Display progress bar while doing some work in C#?
- Thread safety of a Dictionary with multiple concurrent readers and no writers
- Running a method in BackGroundWorker and Showing ProgressBar
- Run multiple UI Threads
- Multi threading C# application with SQL Server database calls
- Looking for an example of a custom SynchronizationContext (Required for unit testing)
- How do I spawn threads on different CPU cores?
- I thought await continued on the same thread as the caller, but it seems not to
- Parallel doesnt work with Entity Framework
- Throwing exceptions in callback method for Timers
- Starting a new thread in a foreach loop