如何吸引人们注意当前的鼠标位置? [英] How to draw attention to the current mouse location?

查看:60
本文介绍了如何吸引人们注意当前的鼠标位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个应用程序,当键盘/鼠标闲置超过15秒时,它会隐藏桌面图标.当用户再次开始使用这两种设备中的任何一种时,我们希望引起他们对鼠标位置的关注,这与在Windows中启用CTRL键来使鼠标转圈非常类似.

We have an app that hides the desktop icons when the keyboard/mouse are idle for longer than 15 seconds. When the user starts using either of these devices again, we would like to draw their attention to the location of their mouse, much akin to how the CTRL key can be enabled to circle the mouse in Windows.

我可以使用任何类似的功能或建议来执行此类任务吗?我发现以全局方式(在桌面上的任何地方,而不仅仅是在我们的应用程序上)使用鼠标非常困难.

Are there any similar functions or suggestions I could use to perform such a task? I find working with the mouse in a global fashion (Anywhere on the desktop, not just on our app) very difficult.

非常感谢您的建议!

推荐答案

1)使用间隔时间为15秒的计时器;

1) use a timer with 15 seconds interval;

2)将当前鼠标位置保存在屏幕上: 在c#中获取鼠标位置

2) save the current mouse location on screen: Getting mouse position in c#

3)当计时器达到15秒时,请再次检查鼠标位置.如果更改,请更新当前鼠标位置.如果未更改,请在鼠标位置的屏幕上绘制一些内容(并且您也需要清洁它): 如何在不带表单的C#中绘制图形

3) when timer reached 15 seconds, check mouse location again. if it is changed, update current mouse location. if it is unchanged, draw something on screen at the mouse location (and you need clean it too): How do I draw graphics in C# without a form

这不是最佳选择,但是如果在15秒钟内移动鼠标,则不太可能在15秒钟内回到其原始位置.

It is not the best choice, but if the mouse is moved during the 15 seconds, it is unlikely it will back to its original location in 15 seconds.

这篇关于如何吸引人们注意当前的鼠标位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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