jasonbb
asked on
Detect no user input
Dear Gurus,
I want to detect when there has been no user input (mouse or keyboard) for a certain amount of time, even if my VB app is not the active app.
Like how windows activates a screen saver.
Thankyou.
I want to detect when there has been no user input (mouse or keyboard) for a certain amount of time, even if my VB app is not the active app.
Like how windows activates a screen saver.
Thankyou.
You could use a timer that checks a variable to see if its on or off. Then use keypress to reset the variable to off or on or whatever on any keypress. Then setup a hold area for your mouse x,y coords. On the timer expire check current mouse x,y against the held ones. At least conceptually. Not sure about all the code but is should be fairly easy.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
I would prefer the above mentioned by Idle_Mind, however there is another way but you should only use it as long as its for personal use and not for deployment.
You can find my example here:
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=64388&lngWId=1
You can find my example here:
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=64388&lngWId=1