Unanswered: Using a "keygen" to activate apps for new clients
I would like to add a "keygen" function to my application where a "code" is generated the first time the client opens the application. I then add this code from the client to an application and create a new code, that the client has to add in order to start using the app, as it is then activated.
Thx Burrina for that code generator.
How do you suggest i use it, as i need the client to phone me with with this serial code generated on his system, with this little app of yours, which is saved somewhere on the pc.. I then add the code to my app, decrypt it and give the client a new code to enter, and it is saved in a secret file which opens the application for say 12 months only.
Please assist if you can
Sorry, forgot the other part. DO NOT OPEN any forms other than in design mode or tables as it will set your 30 day period start date. Hold down shift key when opening. Copy all these files into your db when you are ready to distribute.Then the autoexec macro will do the rest.Design the forms,frmSwitchboard,frmSplash and frmDEMOSPLASH to your liking.The customer can try for 30 days without having to get a key from you, then simply use the KeyGen to generate one and give to Customer when payment has been made.
You may save the code in a standard module of any database, where you want the number get generated. The program can be called from anywhere to return a random 2 digit number (or 4 digit number if changes where made as I have mentioned in the above post).
1. From a Text Box on a Form:
The generated number will be displayed in the text box.
2. From a MsgBox:
MsgBox "Code : " & keygen()
3. From a Report Control, like example one.
Every time the function is called a new random number is generated. Since, the number range is limited to 2 digits repetition of an earlier generated number can occur. It is better to change the program to generate 4 or 5 digit.
For 5 digit numbers set m_min=10000 and m_max = 99999.