Adding An Expiration Date To An Application

Click to select the code.  Use Control-C to copy it to your clipboard. Help


SysUtils includes a function called EncodeDate which makes it simple to compare dates.  In this example we use the native Date function to get the current system date, and then compare it to a reference date set with the variables TheYear, TheMonth, and TheDate.  If the current date is greater then the reference date, then we close the application.

In practice, you'd probably disable various buttons or other controls in the application to limit functionality, rather than close the application; as you'd most likely want to provide a means for the application user to register or purchase the product.


Copyright 2001 - 2012 by and OECCorp.
The 2012 Evolution™ is an OEC InterNET Group site.SupportNotices