Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Derrick Bruce
  Where is Derrick Bruce?
 Charlestown
 Indiana - United States
 Derrick Bruce
 To: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 Tags
Subject: RE: Protect Program with pswd if unattended
Thread ID: 228855 Message ID: 228935 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Projects and Design
Date: Friday, May 22, 2009 5:56:05 PM         
   


> Q1. How can i protect my program with password if user leaves program in menu or in any form call from menu un-attended for more than 5 to 10 minutes or any set time ?
>
> I have designed menu with following command and then generate
>
>
Create Menu MyMenu




Probably a better way to do this, but I have a program that prints a list every 15 minutes, unless they have manually printed somewhere in between. That one just writes a datetime() to a table and then looks at the elapsed time when the timer fires at the interval - if it was run in between, it will adjust the interval on the timer to be 15 minutes from the last run and then the timer will re adjust later on the next run if the interval isn't currently set at 15 minutes.

With yours, you could create a cursor that logs the time they open the program and stamps a time on it - then update it through a form refresh or maybe the activate event of the form. Run a timer to look at the elapsed time and lock it out when it gets over 10 minutes. If there isn't a lot going on, may not be that big of a deal to update it any time any code runs, or even on keypress events.

Just a thought though - let us know what you come up with as I would think there would be a less code intensive way to do this.

D

ENTIRE THREAD

Protect Program with pswd if unattended Posted by Khurram Tahir @ 5/22/2009 7:01:58 AM
RE: Protect Program with pswd if unattended Posted by tushar @ 5/22/2009 8:02:50 AM
RE: Protect Program with pswd if unattended Posted by Khurram Tahir @ 5/22/2009 8:26:40 AM
RE: Protect Program with pswd if unattended Posted by Jun Tangunan @ 5/23/2009 6:50:43 AM
RE: Protect Program with pswd if unattended Posted by Derrick Bruce @ 5/22/2009 5:56:05 PM
RE: Protect Program with pswd if unattended Posted by James Frye @ 5/24/2009 4:43:53 AM
RE: Protect Program with pswd if unattended Posted by Khurram Tahir @ 5/25/2009 9:56:22 AM
RE: Protect Program with pswd if unattended Posted by James Frye @ 6/9/2009 11:52:38 PM