Send mouse & keyboard events

删除回忆录丶 提交于 2019-11-28 09:21:40

There is an open source project on CodePlex (Microsoft's open source website)

Windows Input Simulator (C# SendInput Wrapper - Simulate Keyboard and Mouse)

http://inputsimulator.codeplex.com/

It has examples and real simple to use.

Your definitions should be Uint32:

private const UInt32 MOUSEEVENTF_LEFTDOWN = 0x02;
private const UInt32 MOUSEEVENTF_ABSOLUTE = 0x8000;
private const UInt32 MOUSEEVENTF_LEFTUP = 0x04;
private const UInt32 MOUSEEVENTF_RIGHTDOWN = 0x08;
private const UInt32 MOUSEEVENTF_RIGHTUP = 0x10;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!