How to draw attention to the current mouse locatio

2019-09-09 02:02发布

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!

1条回答
萌系小妹纸
2楼-- · 2019-09-09 02:30

1) use a timer with 15 seconds interval;

2) save the current mouse location on screen: Getting mouse position in 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

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.

查看更多
登录 后发表回答