garyx

garyx

  • NA
  • 3
  • 0

How to Determine which event fired

Apr 10 2004 5:40 AM
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)