2
Answers

How to Determine which event fired

garyx

garyx

20y
1.2k
1
In the subroutine below, Sub Test(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_Click,Button2_Click I can use sender to find out which button was clicked. Dim B as Button = sender me.text = B.Text But in this next subroutine, Sub Test(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter, Button1.MouseLeave We know the sender is Button1 and e.GetType.ToString just returns "System.EventArgs" which we also already know. So my question is "how do I find out which event fired MouseEnter or MouseLeave?" Thank You.
Answers (2)