I have a scenario in which I have to implement a UserControl , On Clicking a button "Process" a background worker works.
I want to trigger a Function/Method of my parent form where I am going to add that UserControl upon "RunWorkerCompleted" Event.
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
Try
bgwFetchGiftCard.RunWorkerAsync()
Catch ex As Exception
WriteLog(ex)
End Try
End Sub
Private Sub bgwFetchCard_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgwFetchCard.DoWork
Try
ds = New DataSet()
'Call ApI Service for Denomination
ds = APICALL()
Catch ex As Exception
WriteLog(ex)
End Try
End Sub
Private Sub bgwFetchCard_RunWorkerCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles bgwFetchCard.RunWorkerCompleted
If ds IsNot Nothing Then
Result = True
'At This Point I Want To Raise Event
'RaiseEvent
Else
'ShowMessage("FAIL")
End If
End Sub
How may i achieve this?anybody kindly suggest