我想知道如果DoWork例程没有理由取消它,是否可以建议您取消RunWorkerCompleted例程。
Private Sub bgwNotifications_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgwNotifications.DoWork
'Do database Work to see if there are results
End Sub
Private Sub bgwNotifications_RunWorkerCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles bgwNotifications.RunWorkerCompleted
'Show message based on results
End Sub`
此刻,我传递一个参数,如果该参数为0,则RunWorkerCompleted例程中不会执行任何代码。是这样还是在完全不运行RunWorkerCompleted例程的DoWork中取消选项?
谢谢您的帮助和建议。
德里克。