您的位置:首页 > 其它

接触/限制鼠标活动区域

2015-01-19 17:16 155 查看
this.Cursor = new Cursor(Cursor.Current.Handle);
Cursor.Position = new Point(Cursor.Position.X,Cursor.Position.Y);//鼠标位置
Cursor.Clip = new Rectangle(this.Location,this.Size);//设置鼠标活动区域窗体的位置和大小

Screen screen = Screen.PrimaryScreen; //创建Screen对象
this.Cursor = new Cursor(Cursor.Current.Handle);//鼠标
Cursor.Clip = new Rectangle(screen.Bounds.Location,screen.WorkingArea.Size);//设置鼠标活动区域
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: