You are customizing a Windows Form to asynchronously update a database. You need to ensure that the form displays a message box to the user that indicates the success or failure of the update. Which three code segments should you use? (Each correct answer presents part of the solution. Choose three.)
A.
Private Sub StartBackgroundProcess() AddHandler bgwExecute.DoWork, AddressOf WorkHandler AddHandler bgwExecute.RunWorkerCompleted, AddressOf CompletedHandler bgwExecute.RunWorkerAsync()End Sub
B.
Private Sub StartBackgroundProcess() AddHandler bgwExecute.ProgressChanged, AddressOf CompletedHandler Dim tsBackground As New ThreadStart(AddressOf WorkHandler) bgwExecute.RunWorkerAsync(tsBackground)End Sub
C.
Private Sub StartBackgroundProcess() AddHandler bgwExecute.RunWorkerCompleted, AddressOf CompletedHandler Dim tsBackground As New ThreadStart(AddressOf WorkHandler) bgwExecute.RunWorkerAsync(tsBackground)End Sub
D.
Sub WorkHandler(ByVal sender As Object, ByVal e As DoWorkEventArgs) … e.Result = TrueEnd Sub
E.
Sub WorkHandler(ByVal sender As Object, ByVal e As DoWorkEventArgs) …
bgwExecute.ReportProgress(100, True)End Sub
F.
Sub CompletedHandler(ByVal sender As Object, ByVal e As _ RunWorkerCompletedEventArgs) Dim result As Boolean = CBool(e.Result) If result Then MessageBox.Show(“Update was successful”) Else MessageBox.Show(“Update failed”) End IfEnd Sub
G.
Sub ProgressHandler(ByVal sender As Object, ByVal e As _ ProgressChangedEventArgs) Dim result As Boolean = CBool(e.UserState) If result Then MessageBox.Show(“Update was successful”) Else MessageBox.Show(“Update failed”) End IfEnd Sub