如何以编程方式触发C#鼠标左键点击? [英] How to programatically trigger a mouse left click in C#?

查看:461
本文介绍了如何以编程方式触发C#鼠标左键点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能编程触发鼠标左键单击事件?

How could I programmatically trigger a left-click event on the mouse?

感谢。

编辑:事件不是上的按钮直接触发。我的目标为Windows平台。

edit: the event is not triggered directly on a button. I'm aiming for the Windows platform.

推荐答案

http://www.pinvoke.net/default.aspx/user32.sendinput

使用的Win32 API发送的输入。

use Win32 API to send input.

这篇关于如何以编程方式触发C#鼠标左键点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆