控制鼠标的工作 [英] Control Working Of Mouse
本文介绍了控制鼠标的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨......
想要使用C#控制鼠标的工作
请帮助
Hi....
Want To Control Working of Mouse using C#
Please Help
推荐答案
如果我可以正确解析语法,则可能意味着控制鼠标光标.在System.Windows.Forms
中,这是通过类System.Windows.Forms.Cursor
完成的.
使用静态属性System.Windows.Forms.Cursor.Positin
读取和修改鼠标光标在屏幕上的位置.
参见:
http://msdn.microsoft.com/en-us/library/system. windows.forms.cursor.aspx [ ^ ],
[ http://msdn.microsoft.com/zh-CN/library/windows/desktop/ms646310%28v=vs.85%29.aspx [
If I could correctly parse you grammar, you may mean controlling mouse cursor. InSystem.Windows.Forms
, this is done via the classSystem.Windows.Forms.Cursor
.
Use the static propertySystem.Windows.Forms.Cursor.Positin
to read and modify the position of mouse cursor on screen.
See:
http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor.aspx[^],
[^].
Simulation of mouse clicks and any other input is more difficult. You will need to P/Invoke Windows APISendInput
, see http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[^]. It simulates input on low-level, with no regard to windows, but using P/Invoke breaks platform compatibility of the code; such code could be used only on Windows.
—SA
这篇关于控制鼠标的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文