Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting no activity

Status
Not open for further replies.

levinll

Programmer
Oct 29, 2001
65
US
I'd like to be able to detect when there's an extended period of no activity when certain forms are being displayed. I know that VB has a timer control that I can set up (though it's max is a minute), but I'm not sure how to determine whether or not any activity has taken place during that minute. I guess I could have onclick events for every control that's on my form, but that sounds like overkill. Any ideas ?
 

Form Level Variable that is a boolean and under every change,click or whatever event you can think of you would set it to true. In your timer you would check to see if it is true and set it to false if so. If it is false then you know there has been no activity.

Good Luck
 
I did this many years ago in VB3. I had 2 weeks of no real programming work so I started goofing off with my application. After 3 minutes of no activity it would iconise itself after another 3 minutes the icon (5 people sitting at a table. Started animating where the people got up one at a time and the last person lit a bomb before walking away and the table blew up. I can tell you it was a LOT of work putting code in all the places that should reset that timer.

What do you want to do maybe if we know more we can suggest alternatives
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top