Do anyone know how to make a 30-trail days shareware program??
Printable View
Do anyone know how to make a 30-trail days shareware program??
There can be many methods. U can store the Rundate and ExpirationDate somewhere in Registry and Update the Rundate each day and stop the program when Rundate>ExpirationDate. You should also check whether clock was set back by the user
Leung! here same tips.
It very easy to archieve this.
All you need is save 3 data into a registry
1. LastVirginDate
2. LastUnloadDate
3. Expired
Step 1
Upon your application first time run. Write the Date into the
LastVirginDate fields in system registry.
Set the Expired field to 0
Step 2
Save the Date into LastUnloadDate everytime you application
is unloaded.
Step 3
On every time your application start, you need to do 3 things:
[*]Check the EXPIRED field = 0/1? If it is "1" then Prompt user abt the
Expired.
[*]Make sure the current date is greater/equal to the LastunloadDate
[*]Calculate the total days of the application being run by using the
DateDiff("d",LastVirginDate, Date)
If you found the return value from DateDiff is Negative value.
Then proceed to set the Expired = 1 and prompt the user.
NOTE: Possible encrypt all the data being save.
Hope this can help you in your need.
Cheers!
You may also want to look at this free control.
http://www.activelock.com