首页 > 其他 > 详细

C#控制鼠标位置

时间:2014-05-23 10:15:40      阅读:387      评论:0      收藏:0      [点我收藏+]

It is not possible using the .NET BCL. However if you really want it you can use native SetCursorPos inUser32.dll.

[DllImport("User32.dll")]
private static extern bool SetCursorPos(int x, int y);

As others will most likely point out, you can achieve the same using System.Windows.Forms, however when developing a WPF application prefer use DllImport.

C#控制鼠标位置,布布扣,bubuko.com

C#控制鼠标位置

原文:http://www.cnblogs.com/xpvincent/p/3737519.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!