I'm trying to hold my mousedown
and up
using code for a remote desktop sort of deal. I managed to do single and double click using this:
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo);
private const int MOUSEEVENTF_LEFTDOWN = 0x02;
private const int MOUSEEVENTF_LEFTUP = 0x04;
private const int MOUSEEVENTF_RIGHTDOWN = 0x08;
private const int MOUSEEVENTF_RIGHTUP = 0x10;
uint ClickX = Convert.ToUInt32(Cursor.Position.X);
uint ClickY = Convert.ToUInt32(Cursor.Position.Y);
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, ClickX, ClickY, 0, 0);
and then double click is just 2 clicks. I found this MSDN on it but this looks like the only mousedown there is but this one is just to click and not hold I'm pretty sure.