0

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.

Thanks very much for the suggestions!

4

1 回答 1

1

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

2)在屏幕上保存当前鼠标位置: Getting mouse position in c#

3) 当计时器达到 15 秒时,再次检查鼠标位置。如果已更改,请更新当前鼠标位置。如果它没有改变,在鼠标位置在屏幕上画一些东西(你也需要清理它): How do I draw graphics in C# without a form

这不是最佳选择,但如果鼠标在 15 秒内移动,它不太可能在 15 秒内回到原来的位置。

于 2012-12-05T17:49:38.747 回答