Detecting Right mouse click

pokemon

Member
Joined
Jul 7, 2003
Messages
11
Hi
Im trying to detect when a user clicks the right mouse button.
Ive tried various bits of code, but only got this far
Sub OnMyControlButtonUp(ByVal sender As object, ByVal e As MouseEventArgs)
If e.Button = MouseButtons.Right Then
MsgBox("HI") other code to execute
end if
End Sub

but errors saying MouseeventArgus is not defined. From what i have found so far the import namespace for this is System.Windows.form.
Any help welcome. as ive jumped in at the deep end and cant work it out.
Thanks
 
Fair enough.
Id done it before on an asp Page using javascript, but was just curious to see if it was possible using .NET

Cheers.
 
Back
Top