I need to detect what event (e.g. TextChanged) is currently being handled from within the handling Sub that's handling multiple objects/events. I cannot find examples online (though this may be a terminological issue). I already know how to detect the object but I do not know how to detect the event.
Private Sub TextBox_CombinedEvents(sender As Object, e As EventArgs) Handles TextBox1.Enter,
TextBox2.Enter, TextBox1.TextChanged, TextBox2.TextChanged,
Dim detectedEvent as String = "?"
If detectedEvent = "Enter" Then
MessageBox.Show("Text has been entered.")
Elseif detectedEvent = "TextChanged" Then
MessageBox.Show("Text has been changed.")
Elseif detectedEvent = "Leave" Then
MessageBox.Show("Text box has been left.")
MessageBox.Show("Event not detected.")