在VMWare C#中以编程方式移动鼠标 [英] Programaticly Move Mouse in VMWare C#

查看:147
本文介绍了在VMWare C#中以编程方式移动鼠标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个使用鼠标光标播放的玩具应用程序,并且试图以编程方式移动它.在普通计算机上使用Cursor.Position = ...或Win32互操作调用都可以正常工作,但是我很难使它在VMWare下工作.

I'm writing a toy application that plays with the mouse cursor, and I'm trying to move it programmticly. Using either Cursor.Position = ... or Win32 interop calls work fine on a normal machine, but I'm having difficulties getting it to work under VMWare.

有人有什么建议吗?

要澄清:

我有一个小型的Windows窗体应用程序,它是在VM内运行的,它上面有一个按钮,单击时应该在VM内移动鼠标光标.我同时使用了Cursor.Position方法和 Wolf5 所建议的方法.

I've got a small windows forms application I've made running inside the VM, it has one button on it, when clicked it is supposed to move the mouse cursor inside the VM. I've used both the Cursor.Position method and the approach that Wolf5 has suggested.

推荐答案

我已经解决了该问题.

我拼命尝试尝试任何,我终于放弃了,并从VM卸载了鼠标驱动程序.重新启动后,我的玩具应用程序可以正常工作.

In a desperate attempt to try anything i finally gave up and un-installed the mouse driver from the VM. After a reboot, my toy application works.

该设备被列为VMWare Pointing设备,重新引导后将其显示为未知设备",但是鼠标仍然可以工作.尽管我在乳头一侧有点.

The device was listed as a VMWare Pointing device, after the reboot it's coming up as an "unknown device", but the mouse still works. Albeit I a little on the nippy side.

这篇关于在VMWare C#中以编程方式移动鼠标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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