Topic: Nag Screen Trial Period
Hi,
I have a Nag screen that I use to administer a 15 day FREE Trial period. If the date is within the 15 day period then the user can go ahead and continue the trial.
.
If the trial period reaches 0 then this code kicks in:
if iDays = 0 then
begin
showMessage('----- Trial Period Has Ended -----') ;
frmNagScreen.SetFocus
end else
frmNagScreen.close ;
.
This works fine.
However I noticed today that if the user doesn't come back to the program for a few days the iDays will go to -1 or -2 ....
Since IDays is NOT 0, then it lets the user continue to use the program.
.
I need to check for 0 and/or -1 at the same time.
Using my code above I can check for 0 or -1 separately, but not both at the same time. I'm guessing I could maybe do it with an OR function but I haven't been able to make it work.
.
UPDATE: I just tried if iDays <= 0 then... and it worked because right now idays is 0. So I guess I'll wait till tomorrow to see if it works for idays = -1, unless you have any suggestions?
SORRY: It looks like <= is not working after all. So I'm back to my original problem.
.
As always your help will be appreciated.
Thanks
Frank