Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a Time Lock Version
Message
 
To
28/05/2004 15:06:07
Isabel Cabanne
Hubbard Woods Software, Inc.
Winnetka, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00908297
Message ID:
00908468
Views:
22
>A am preparing to add a "good for 30 days unless you buy it" feature to a VFP applicaion. I'm interested in your experience with this and where you think the best place to store the related information is. I'm thinking about the registry.
>
>Any recommendations appreciated.
>
>Isabel Cabanne

In addition to Alex and Brandon, there is a "cheap and dirty" way.

Your program would need a system DBF with a 10 character field. Leave it blank. Lets call the field cStartUp
First time user runs program, get the system date convert it to a string and replace the "slashes" with "dots" so it appears as
"01.01.2004", and the write it to the (empty character) field (cStartUp)in the "system" dbf.

When your app runs use this house keeping code
select MySystem
if empty(cStartUp)&& First open code (see above)
   replace cStartUp with STRTRAN(DTOC(DATE()),[/],[.]) &&"01.01.2004"
else
if ![.]$cStartUp && The program has expired 
   messagebox([Time to buy!])
else
if DATE()-CTOD(STRTRAN(cStartUp,[.],[/]))>29 && Mark Expired
   replace cStartUp with STRTRAN(cStartUp,[.],[/]) &&"01/01/2004"
endif
endif
endif
Typically, if the user has a means to modify the date they will place dashes "-", or slashes "/" to trick the expiration (ex: "02/01/2004", which will STILL kick in the Expiration message!

Of course this doesn't account for re-intstalls or "blanking" the cStartUp field (this could be overcome by putting something in the firld (not leaving it empty).
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform