Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mohammad Irfan
  Where is Mohammad Irfan?
 karachi
 Pakistan
 Mohammad Irfan
 To: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 Tags
Subject: RE: How to auto log-off programatically?
Thread ID: 345424 Message ID: 345443 # Views: 55 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Security and Application Protection
Date: Wednesday, May 23, 2012 12:09:37 PM         
   


> > Dear Experts,
> >
> > I am running a program over LAN environment (data files are resident on a Windows Server 2003).
> > Is it possible to make the users automatically loged off conditionally from the program using some database function or 'wscript' etc?
> > Reason is that some users left the pcs as logged in with the program and when electricity goes off, it creates risks for the data.
> >
> > Thanking you,
> > Irfan
>
> Have a timer that checks for a table (configuation) and look for a field that contains the time you want users to log off. When you reach that time, log them off.
>
>
> Mike Gagnon
> Refox XI +(English version)



Thanks for your reply Sir.
Where to place that timer?
I have tried to add a timer class (_screen.AddObject('mytimer','tempclass.closetimer')) and in 'timer' event of that class i have tried this:

LOCAL nobj
nobj = 0
nobj = ASELOBJ(nObjects)
IF m.nobj = 0
CLEAR EVENTS
CLOSE TABLES all && and other codes to close all forms inside _screen
ENDIF


This to know if user made no activity for a given time (i.e. 30 minutes) program should be closed automatically. Is it OK? but this timer is not working as I want it to do. Although I close the program but ASELOBJ does not create array although I open a form and click a button on it. Please guide how to do it.

Best regards,
IRFAN

ENTIRE THREAD

How to auto log-off programatically? Posted by Mohammad Irfan @ 5/23/2012 10:11:35 AM
RE: How to auto log-off programatically? Posted by Mike Gagnon @ 5/23/2012 11:58:59 AM
RE: How to auto log-off programatically? Posted by Mohammad Irfan @ 5/23/2012 12:09:37 PM
RE: How to auto log-off programatically? Posted by Mike Gagnon @ 5/23/2012 12:20:43 PM
RE: How to auto log-off programatically? Posted by Mohammad Irfan @ 5/23/2012 1:12:34 PM
RE: How to auto log-off programatically? Posted by Mike Gagnon @ 5/23/2012 4:32:59 PM
RE: How to auto log-off programatically? Posted by sumadi kwee @ 5/24/2012 3:02:47 AM
RE: How to auto log-off programatically? Posted by Mohammad Irfan @ 5/24/2012 7:56:10 AM
RE: How to auto log-off programatically? Posted by Mohammad Irfan @ 5/24/2012 8:31:36 AM
RE: How to auto log-off programatically? Posted by Jun Tangunan @ 5/24/2012 3:32:09 AM
RE: How to auto log-off programatically? Posted by Mohammad Irfan @ 5/24/2012 8:04:17 AM
RE: How to auto log-off programatically? Posted by Jun Tangunan @ 5/24/2012 8:18:31 AM
RE: How to auto log-off programatically? Posted by Mohammad Irfan @ 5/24/2012 8:33:30 AM