Hi John ,
here you what i have done
and on btnstop :Code:Private Sub bgwkdata_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgwkdata.DoWork If bgwkdata.CancellationPending Then e.Cancel = True Exit Sub End If //my boucle here If bgwkdata.CancellationPending Then e.Cancel = True Exit Sub End If
Edit : i get it to work i placed the code in the boucleCode:Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click bgwkdata.CancelAsync() End Sub
Thanks




Reply With Quote