right click on a label

  • Thread starter Thread starter David Pick
  • Start date Start date
D

David Pick

I have a label I create using code like this

dim lbl as new label
me.controls.add(lbl)

addhandler lbl.click, addressof someclick

private sub someclick(ByVal sender As Object, ByVal e As
System.EventArgs)
....
end sub

How would I go about testing whether the user right or left clicked on
the label? Thanks.

- David
 
your code is incorrect.



private sub someclick(ByVal sender As Object, ByVal e As
System.ClickEventArgs)

'Some code

end sub
 
Ryan S. Thiele said:
your code is incorrect.

private sub someclick(ByVal sender As Object, ByVal e As
System.ClickEventArgs)

No, the code was right. 'System.Windows.Forms.Control.Click' is of type
'System.EventHandler'.
 
Back
Top