You should use this upon when your applications setup is run and store the value in a custom property or in the registry (If deploying to Windows only.)
Code: Select all
On PreOpenCard
Local tExpiryDate
Convert The System Date To DateItems
-- Substitute 30 for the amount of days you want.
Add 30 To Item 3 Of It
Convert It To System Date
Put It Into tExpiryDate
-- Save tExpiryDate to the place you want.
Set The ExpiryDate Of Stack "ActivationDetails" To tExpiryDate
End PreOpenCard
Code: Select all
On PreOpenCard
Local tExpiryDate
-- Place the value that you stored earlier into tExpiryDate
Put The ExpiryDate Of Stack "ActivationDetails" Into tExpiryDate
If The System Date Is tExpiryDate Then
Answer Error "The 30 day trial has finished please activate the software to continue."
Quit
End If
End PreOpenCard
