Beispiel #1
0
 /// <summary>
 /// Performs a mouse scroll
 /// </summary>
 /// <example>
 /// <code>
 /// Mouse.Scroll(-50);
 /// </code>
 /// </example>
 /// <param name="wheeldelta">Positive scrolls down, negative scrolls up</param>
 public static void Scroll(int wheeldelta)
 {
     NativeMethods.mouse_event((uint)NativeMethods.MouseEventFlags.WHEEL, 0, 0, -wheeldelta, IntPtr.Zero);
 }
Beispiel #2
0
 /// <summary>
 /// performs a left button down at the current cursor position
 /// </summary>
 /// <remarks>
 /// make sure to release the mouse button using "LeftUp()". Otherwise there can happen unintended consequences
 /// </remarks>
 /// <example>
 /// <code>
 /// Mouse.LeftDown();
 /// </code>
 /// </example>
 /// <returns></returns>
 public static void LeftDown()
 {
     NativeMethods.mouse_event((Int32)(NativeMethods.MouseEventFlags.LEFTDOWN), 0, 0, 0, new IntPtr(0));
 }
Beispiel #3
0
 /// <summary>
 /// Performs a right button up
 /// </summary>
 /// <example>
 /// <code>
 /// Mouse.RightUp();
 /// </code>
 /// </example>
 /// <returns></returns>
 public static void RightUp()
 {
     NativeMethods.mouse_event((Int32)(NativeMethods.MouseEventFlags.RIGHTUP), 0, 0, 0, new IntPtr(0));
 }