<p>I run a series of time consuming operations on a background worker thread.  At various stages I update a (windows form) progress bar by invoking a delegate.  However, one of the more time operations occurs on a single line of code.</p>

<p>Is it possible to :</p>

<p>a) Update the UI while that single line of code is being executed, or at least display an animated icon that shows the user that work is being done.</p>

<p>b) Let the user cancel the background worker thread while that single line of code is being executed</p>

Unfortunately, probably not.  The background worker thread needs to call ReportProgress to update the UI thread, and it needs to watch the CancellationPending to know whether it should stop or not.  So, if your worker thread is running along-running operation in a single line, there's no way to make this work.
Perhaps, I've misunderstood, so here's code that simulates what I'm getting at:
```
```
public void DoWork() {
    System.Threading.Thread.Sleep(10000);

    // won't execute until the sleep is over
    bgWorker.ReportProgress(100);
}
```
```