我使用以下代码:
private const int MOUSEEVENTF_WHEEL = 0x0800;
public void MouseWheelUp()
{
mouse_event(MOUSEEVENTF_WHEEL, 0, 0, 120, 0);
}
但是我如何让它向下滚动?
最佳答案
mouse_event function
函数签名:
VOID WINAPI mouse_event(
_In_ DWORD dwFlags,
_In_ DWORD dx,
_In_ DWORD dy,
_In_ DWORD dwData,
_In_ ULONG_PTR dwExtraInfo
);
向下滚动:
mouse_event(MOUSEEVENTF_WHEEL, 0, 0, -120, 0);
关于c#模拟鼠标滚轮向下,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37262822/