发送鼠标点击(在表格内) [英] Send mouse click (within form)
本文介绍了发送鼠标点击(在表格内)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何以表格形式发送鼠标单击(左键单击).我设法移动了鼠标指针,只需要单击它即可.
How to send mouse click(left click)within form. I''ve managed to move mouse pointer and only needed to click it.
推荐答案
如果这是模拟鼠标输入,则需要使用P/Invoke和raw Windows APISendInput
,请参见 http://msdn .microsoft.com/en-us/library/windows/desktop/ms646310%28v = vs.85%29.aspx [ http://pinvoke.net/default.aspx/user32.sendinput [ ^ ].
函数mouse_event
被SendInput
取代,因此最好使用SendInput
( ^ ]).
此功能是低级的,它的工作原理类似于由硬件触发的输入(实际上,据我所知,实际的硬件事件会触发这些功能之一).
-SA
If this is simulation of mouse input, you need to use P/Invoke and raw Windows APISendInput
, see http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[^], http://pinvoke.net/default.aspx/user32.sendinput[^].
The functionmouse_event
was superseded bySendInput
, so better useSendInput
(http://msdn.microsoft.com/en-us/library/windows/desktop/ms646260%28v=vs.85%29.aspx[^]).
This function is low-level, it works like an input triggered by hardware (in fact, from what I know, real hardware event triggers one these functions).
—SA
^ ]
这篇关于发送鼠标点击(在表格内)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文