Home All Groups Group Topic Archive Search About

right click on a label

Author
19 Oct 2006 4:40 AM
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

Author
19 Oct 2006 5:02 AM
Ryan S. Thiele
your code is incorrect.


On 19-Oct-2006, "David  Pick" <pickda***@gmail.com> wrote:

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

    'Some code

end sub




--
Thiele Enterprises - The Power Is In Your Hands Now!
Author
19 Oct 2006 2:06 PM
Herfried K. Wagner [MVP]
"Ryan S. Thiele" <mali***@verizon.net> schrieb:
> 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'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>