Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto close feature
Message
De
17/01/2005 06:06:56
 
 
À
17/01/2005 05:46:08
Somesh Sahu
Cybage Software Pvt Ltd,
Pune, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
00977685
Message ID:
00977686
Vues:
47
>Hi,
> Is it be possible to have an auto close feature in an application so that if a user does not access the application for say 30 minutes, the user gets logged out?
>
> If yes, please tell how to implement this.
>
>Thanx and regards,

Hi Somesh.

A simple approach to this is to create a custom timer class. The custom timer should have additional properties to store the last mouse x,y position and the last time the user did something. Then at the start of your app create the custom timer and have it run once every few minutes or whatever.

The timers event code would test to see if the mouse has moved since the last call to the timer event. If the mouse has moved then save the current mouse x,y position, and save the current time. If nothing has changed then see if the current time is more than, say, 30 minutes past the last time something changed. Take action as appropiate.

This does not test for keyboard activity but how likely is it that the user never touches the mouse in 30 minutes in your app? You could also test for keyboard activity if you feel you need to.

Also check out threads like this one: Auto Logout Thread #92027
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform