How to perform a Virtual Mouse click C# without us

2019-04-02 01:09发布

I'd like to perform a click in a windows application, without using the real mouse (so I can minimize it). Much like a bot would behave.

How would I do this?

7条回答
虎瘦雄心在
2楼-- · 2019-04-02 01:51

You'll need the resolution of the machine that it's on, use the System.Windows.Forms.Screen class, here: SO

You will then need to move the mouse to that location, or avoiding that, you may need to hook to the program that's running, and send it an event that causes it to minimize.

It's going to be hard to get something like this to work with C#, as you'll need to inject that DLL into the program. A lower level language like C may be helpful.

Here's a brief explanation / question

查看更多
登录 后发表回答