鼠标事件处理 [英] Mouse Event handling
本文介绍了鼠标事件处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,
我想使用计时器控件在空闲时关闭我的应用程序,并且当鼠标指针中没有任何活动时,我想读取鼠标光标,我的应用程序应在60秒内关闭.请帮助我.
Hello friends,
i want to close my application when it is in idle using timer control, and i want to read mouse cursor for that when no activities in mouse pointer my application should close in 60 second. please help me.
推荐答案
您可以使用这篇介绍检查用户不活动状态的文章:
如何在C#中使用和不使用平台调用来检查用户是否不活动 [
Hi,
you could use this article that describes checking for user inactivity:
How to check for user inactivity with and without platform invokes in C#[^]
If there was no activity for your given time, you could simply close your app.
嘿!
我发现本文 [
Hey!
I found this article[^] right here at the code project that should be able to help you. Hope you''ll work it out, let us know!
Good luck,
Eduard
之前已经讨论过所有内容,请参见:自动关闭Windows应用程序 [ ^ ]
再说一遍:不要这样做!请参阅讨论,它很有用,并包括您需要的解决方案.但是...不要这样做.
—SA
That all was discussed before, see: Close windows application automatically[^]
Than again: don''t do it! See the discussion, it is useful and include the solutions you need. But… don''t do it.
—SA
这篇关于鼠标事件处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文