public static void MouseWheel(AutomationWrapper w, int clicks) { var c = Cursor.Position; if (w != null) { c = w.PhysicalToLogicalPoint(c); } MouseInput input = GetAbsoluteMouseInput(c.X, c.Y); input.mouseData = clicks; input.dwFlags |= (int)MouseFlags.MOUSEEVENTF_WHEEL; SendInput(input); }
public static void MouseWheel(AutomationWrapper w, int clicks) { var c = Cursor.Position; if (w != null) { c = w.PhysicalToLogicalPoint(c); } MouseInput input = new MouseInput(); input.type = (int)InputType.INPUT_MOUSE; input.mouseData = clicks; MouseFlags flags = MouseFlags.MOUSEEVENTF_WHEEL; input.dwFlags = (int)flags; input.dx = c.X; input.dy = c.Y; SendInput(input); }