开发者

Detecting Mouse Wheel Events When Form Does Not Have Focus In Visual Basic 2010

I want to make an auto log off feature, I want to detect if there is any u开发者_运维问答ser input, and if there isn't the user will be automatically logged off. So I want to know how to detect mouse wheel events when the form doesn't have focus. Any help would be much appreciated. Is it possible, because I have searched everywhere and can't seem to find it. Thanks.


According to the WM_MOUSEWHEEL Message definition:

"Sent to the focus window when the mouse wheel is rotated. The DefWindowProc function propagates the message to the window's parent. There should be no internal forwarding of the message, since DefWindowProc propagates it up the parent chain until it finds a window that processes it."

The only way you could possibly do this is with a global hook but I very much doubt you can do this using managed code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜