right click on a label

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
 
R

Ryan S. Thiele

your code is incorrect.



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

'Some code

end sub
 
H

Herfried K. Wagner [MVP]

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'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top