Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How to recognize being "Idle"?
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Ashi_Mashi2




PostPosted: Thu Apr 21, 2005 8:59 pm   Post subject: How to recognize being "Idle"?

Hi, i want to know if there is a way using VB to recognize if the user is idle or not...or if there isnt a direct way to do it, then maybe seeing if there are any keys pressed, or keep track of any mouse movements...thx
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Apr 22, 2005 8:39 am   Post subject: (No subject)

You can keep track of the mouse movement. Look up the API for that.

Create a timer, and reset it every time the mouse is moved a significant amount (shaking table does not count for an active user).

If the timer manages to get up to 5 minutes or your value of choice -- you may assume that the user fell off the chair and is badly hurt.
Cinjection




PostPosted: Fri Jun 10, 2005 2:34 pm   Post subject: (No subject)

Yea set the interval of a timer to like 5 minutes and put this

code:

Private Sub timer1_timer()
      msgbox "Stop being idle....you idiot"
end sub


"a true programmer tries to insult users with message boxes." -~ for dummies

lol
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: