Hi,
In an event handler of a tab chaged of a tabcontrol, I call a method asynchrounously, like this:
Private Sub tabDetails_Deselecting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TabControlCancelEventArgs) Handles tabDetails.Deselecting
' we pass pageindex so that we set the index back in case the validation fails
Dim params = New Object() {e.TabPage.Controls(0), e.TabPageIndex}
AsyncCaller.DoOperation(AddressOf AsyncSaveObject, params, AddressOf ShowSaveResult)
End subIs there a way when the method call finishes and ShowSaveResult returns to cancel the event tabDetails_Deselecting that triggered that method? like this:
e.cancel = true so that the tab goes back to the previous tab?
So far that did not work for me, is there any way to do that please?
Thanks




Reply With Quote