Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Logout the app when the user has many time with out work
Message
 
 
À
03/05/2001 13:57:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00503152
Message ID:
00503172
Vues:
21
>Yeah you right, but I don´t know how do it.
if vartype(gotimer_inactivity)="o"
  * the countdonw began again
  gotimer_inactivity.Reset()
endif
The same code that you were setting the Interval needs to be modified to call Reset. However, I wouldn't recommend using the MouseMove event. This occurs too often for my tastes. The event can also occur because of vibrations of your computer's internal fan. No one is there but the mouse imperceptably moves.

Instead of the control's KeyPress event, you could add it to the form's KeyPress event and set the form's KeyPreview property to .T.. That way you centralize the call to the form and no matter how many controls you have on the form, it works.

The Timer event of the global timer needs to have code in it to log a user out. Some of the issues to take into account are:
1. Closing open forms. You could cycle through the _Screen.Forms collection to close all the forms. Ex.
With _Screen
   for lxx = .FormCount to 1 step -1
      if upper(.Forms[lxx].BaseClass) = "FORM" then
         if .Forms[lxx].QueryUnload() then
            .Forms[lxx].Release()
         else
            * you can't close the form; you need to figure out a way of exiting from the form gracefully
         endif
      else
         * object is probably a toolbar so you may or may not need to release it
      endif
   endfor
Endwith
2. "Logging" current out of your application. WHat does this mean? Give them a new login screen or totaslly exit the application.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform