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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trapping Non Activity(i.e. mouse clicks, key presses, etc) in App?

Status
Not open for further replies.

bentleygt

Programmer
Feb 24, 2004
16
US
I'm using PB6.5 and I would like to add a feature to the app where by if there is no activity by the user(i.e. - mouse clicks, key presses, etc) then the app. would log the user off and bring them back to a login screen.

I know I have to use the Timer event and Timer function in my main window, but how do I go about trying to determine if there has been no activity by the user? Is there a function I call for no activity? Would I need this function in every single window?
 
pb app has an event called "idle"

From PB Help:

Description

Occurs when the Idle function has been called in an application object script and the specified number of seconds have elapsed with no mouse or keyboard activity.

Example:

This statement in an application script causes the Idle event to be triggered after 300 seconds of inactivity:

Idle(300)

In the Idle event itself, this statement closes the application:

HALT CLOSE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top