I found my own answer (incase this helps anyone who searches here in the future). This code can do the detection on the MapControl.Click event:
IF e.GetType.name.toupper.trim = "MOUSEEVENTARGS" THEN
IF DirectCast(e, System.Windows.Forms.MouseEventArgs).Button = "Left" THEN
Console. WriteLine("Right click with mouse has occurred")
END IF
END IF
------------------------------
Nicholas Evanish
Senior Program Analyst
------------------------------
Original Message:
Sent: 09-23-2024 14:48
From: Nicholas Evanish
Subject: Is it possible to detect right-click functionality in a client based .NET application?
Support,
Is it possible to detect right-click functionality in a client based .NET application?
I have an application where I use the left-click mouse button for everything (right now); however, when I test out trying to first capture the "right-click" I am not having any luck. My map control object's ID is "MapControl1"
I can use the "MapControl1.Click" to detect a click was made; however, I am having an issue recognizing if it was a left or a right-click?
Can anyone help?
------------------------------
Nicholas Evanish
Senior Program Analyst
------------------------------