Hi Bob,
1. You must set WorkerReportsProgress to true on the BackgroundWorker object.
2. Register an event handler with the ProgressChanged event on the
BackgroundWorker. The handler will be invoked on the UI thread, so you can
update a ProgressBar control or whatever you'd like.
3. In the DoWork event handler, register an event handler for the progress
changed event of the DT object that is created.
4. In the event handler for the DT progress change event, call the
ReportProgress method on the BackgroundWorker
Anonymous methods can make this process much easier for you if you don't have
a global variable declared for the BackgroundWorker or if you create a new
BackgroundWorker each time the process must run:
BackgroundWorker worker = new BackgroundWorker();
worker.WorkerReportsProgress = true;
// ProgressBar control
progress.Value = 0;
worker.ProgressChanged += delegate(object sender1, ProgressChangedEventArgs
e1)
{
// update the progress bar
progress.Value = e1.ProgressPercentage;
};
worker.DoWork += delegate(object sender1, DoWorkEventArgs e1)
{
// here you would create your DT object
// here you would register an event handler - another anonymous
// method could be used so you have access to the "worker"
// variable in the event handler
// as an example, I'll just update the progress directly:
for (int i = 1; i <= 10; i++)
{
System.Threading.Thread.Sleep(100);
worker.ReportProgress(i * 10);
}
worker.ReportProgress(100);
};
worker.RunWorkerAsync();

Signature
Dave Sexton
> Hi,
> I am having trouble seeing how this bolts together.
[quoted text clipped - 13 lines]
> Thanks in Advance.
> Bob