/// Simulates a right button double click at the current
/// cursor position
public static void SimulateRightMouseDoubleClick()
{
int mouseX = Cursor.Position.X;
int mouseY = Cursor.Position.Y;
User32Interop.mouse_event(User32Interop.MOUSEEVENTF_RIGHTDOWN |
User32Interop.MOUSEEVENTF_RIGHTUP, mouseX, mouseY, 0, 0);
User32Interop.mouse_event(User32Interop.MOUSEEVENTF_RIGHTDOWN |
User32Interop.MOUSEEVENTF_RIGHTUP, mouseX, mouseY, 0, 0);
}