Hi i have a requirement to check for a button click is a performclick or not . some thing like if(click is button1.performclick()) {do something } else {do something }
can any one help
Hi i have a requirement to check for a button click is a performclick or not . some thing like if(click is button1.performclick()) {do something } else {do something }
can any one help
Check the event args of the Click event.
When you click the button itself; the event args contain the coordinates of the mouse. When PerformClick was executed; the event args are empty.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If e.Equals(EventArgs.Empty) Then
' Performclick
Else
' Normal click
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Button1.PerformClick()
End Sub