This question seems to point to the existence of a windows event for a double-right-click. How to implement it in a C# windows form, however, is less than clear.
What's the best way to implement double-right-click on a control such as a button?
(I'm thinking I must use MouseDown
and keep track of the time between clicks. Is there a better way?)
Typically, a single click initiates a user interface action and a double-click extends the action. For example, one click usually selects an item, and a double-click edits the selected item.
On most systems, double-clicking an icon in the file manager will perform a default action on the object represented by the icon. Double-clicking an application program will launch the program, and double-clicking a file icon will open the file in a default application for that file's type or format.
Practice double-clicking To double-click, press your left mouse button twice quickly. If you're using a laptop with a touchpad, you can also double-tap the touchpad.
Meaning of double-click in Englishto press a computer mouse twice in order to tell the computer to do something: Double-click (on) the icon to start the program.
Override the WndProc
function and listen for WM_RBUTTONDBLCLK
, which as can be seen on this pinvoke page is 0x0206
.
That pinvoke page also has some C# sample code for how to do it.
Whenever you see something about a windows message and/or windows API and you want to use it in C#, the pinvoke site is a good place to start looking.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With