如何在C#中编程触发鼠标左键? [英] How to programatically trigger a mouse left click in C#?
本文介绍了如何在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屋!
查看全文