跟踪我的窗体外的鼠标移动 [英] Tracking mouse movement outside my form

查看:65
本文介绍了跟踪我的窗体外的鼠标移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用AForge.net框架跟踪应用程序,
我遇到了一个问题,当我在窗体上的程序"仍在运行时单击桌面时,它根本无法跟踪.
因为我需要模拟鼠标单击,拖放事件,所以我想在手指上戴彩色帽(红色代表单击,蓝色代表移动)来执行此操作,
因此,当我单击桌面"i.e Image.jpg"上的对象",并且需要再次将其拖动到表单中时,跟踪将停止,因为已禁用了对表单的关注.
所以我的问题是,当我点击表格以外的区域时,跟踪停止了.
附言:追踪一直在显示的框架上绘制一个蓝色矩形,但是当我尝试获取移动Blob的位置时,它将停止.当我再次单击表单时,它会继续显示Blob的位置.
我在C#中尝试了背景工作者组件,但不幸的是@ all不能正常工作.
我需要帮助.我必须在三周后提交毕业项目.
提前考虑一下

Hi
I''m working on tracking application using AForge.net framework,
i got a problem which it''s when i click on the desktop while the "program" the form is still running, it''s not tracking at all.
because i need to simulate mouse clicks, Drag and Drop events i want to perform this with a colored cap on my fingers (red for click and blue for moving),
so, when i click on an Object on the desktop "i.e Image.jpg", and i need to drag it into the form again,so, the tracking stops because the focus on the form is disabled.
so my problem is the TRACKING STOPPED WHEN I CLICK ON AN AREA OUT OF THE FORM.
p.s.: the tracking keeps drawing a blue rectangle on the displayed frame, but when i try to get the location for the moving blob it stops. and when i click again on the form it continue to display the location for the blob.
i tried the background worker component in C#, but unfortunately not worked @ all.
i need help plz. i must hand in my graduation project 3 weeks later.
thnaks in advance

推荐答案

您应该考虑的标题不是愚蠢的,并且与您的问题有关.

使用Mouse.Capture捕获表单外部的鼠标事件.
You should consider a header that''s not stupid, and relates to your question.

Use Mouse.Capture to capture mouse events outside your form.


这篇关于跟踪我的窗体外的鼠标移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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