To see the right click event I am referring to, see this video.
I am working on an application that adds a zoom button in a Windows Forms application. When the user touches the button, the application should continuously zoom the window. This works by monitoring the mouse down event on the button. While the mouse is down, a timer continues to zoom the view in. This works fine so long as the users finger slides after the initial touch. However, if the user pushes on one spot the entire time, they will get a little wait circle then a right click event.
I've added the code from this link to the application:
public bool PreFilterMessage(ref Message m)
{
// Filter out WM_NCRBUTTONDOWN/UP/DBLCLK
if (m.Msg == 0xA4 || m.Msg == 0xA5 || m.Msg == 0xA6) return true;
// Filter out WM_RBUTTONDOWN/UP/DBLCLK
if (m.Msg == 0x204 || m.Msg == 0x205 || m.Msg == 0x206) return true;
return false;
}
This code disables the resulting right-click event. However, the circle still happens and a mousedown event does not happen. Is there a way to make any physical touch count as a mouse down and not start the right click process?
Edit I tried going to Control Panel
-> Pen and Touch
and disabling the Press and Hold for right click feature. This disabled the spin icon, but the mouse down still doesn't occur unless the user moves their finger slightly. I don't see why a user has to scribble to hold down a button.