In the MSDN library article "How to: Use a Background Worker",
the following sample code is presented...
Private Sub bw_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs)
Dim worker As BackgroundWorker = CType(sender, BackgroundWorker)
For i = 1 To 10
If bw.CancellationPending = True Then
e.Cancel = True
' Perform a time consuming operation and report progress.
bw.ReportProgress(i * 10)
For what purpose has the "Dim worker as..." statement been included in this code?
View Complete Post