Hi:
I am using a combo box and validating its contents as the text changes. At the start of the method, I remove the handler (to prevent multiple calls) and then add the handler back when I am done. However, the event is called 2 more times (3 total) after the event exits. I have noticed this with the key events as well. In my app, I am not trapping any other events...what is causing the same event to be called 3 times?
Any thoughts would be appreciated.
Thnks!
Eric
The event code is as follows:
Private Sub cbExamRoom_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
RemoveHandler cbExamRoom.TextChanged, AddressOf cbExamRoom_TextChanged
Try
If VarInitialLoadComplete Then
AutoComplete(cbExamRoom)
End If
Catch ex As Exception
LocalErrorLink.Error_Handler(ex)
Finally
AddHandler cbExamRoom.TextChanged, AddressOf cbExamRoom_TextChanged
End Try
End Sub
I am using a combo box and validating its contents as the text changes. At the start of the method, I remove the handler (to prevent multiple calls) and then add the handler back when I am done. However, the event is called 2 more times (3 total) after the event exits. I have noticed this with the key events as well. In my app, I am not trapping any other events...what is causing the same event to be called 3 times?
Any thoughts would be appreciated.
Thnks!
Eric
The event code is as follows:
Private Sub cbExamRoom_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
RemoveHandler cbExamRoom.TextChanged, AddressOf cbExamRoom_TextChanged
Try
If VarInitialLoadComplete Then
AutoComplete(cbExamRoom)
End If
Catch ex As Exception
LocalErrorLink.Error_Handler(ex)
Finally
AddHandler cbExamRoom.TextChanged, AddressOf cbExamRoom_TextChanged
End Try
End Sub