Control the mouse cursor using C#

Deadly 提交于 2019-12-03 02:37:00

I think unless you're just positioning the cursor over your own application, you have to use a windows api call. You can reference that in C# as such:

[DllImport("user32")]
public static extern int SetCursorPos(int x, int y);

There's source code for a more complete Win32 wrapper class here

You will have to write a client application that us run on the remote machine to receive your mouse movement command messages. That client application will then take control of the mouse, and move it to commanded coordinates.

There are several applications that allow remote desktop control. Microsoft supplies at least a couple (Netmeeting, Remote Desktops). VNC is another popular tool. Joel has his CoPilot built on VNC.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!