Fine. This application was developed just to show how you can use the ActiveLock 1.5 component.
This project is a Trialware for 15 days only or till you buy the license. If the user use the application for more than 15 days, it will not work, only the window to enter the Liberation Key will be available. This will happen because the system will verify if the user has already enter a valid Liberation Key. Once this Key is correct entered, the application will work fine.
I have used 4 forms:
Please, press Shift+Ctrl+F11. You'll see the Project Options. Take a look at the 'Auto-Create forms' window. As you can see, there is only one form to be created (frmMainForm). We'll create the other forms only if needed. Thus, the application will not loose time, memory and the patience of our user.

This is the main form, where is the "heart" of the application. Let's suppose that this is a very useful program. Now let's take a look at the it's code, press F12 to toggle between the form and the unit:
procedure TfrmMainForm.FormCreate(Sender: TObject); begin //In this event we will verify if the user have //registered, if Yes then the main form is shown //and the application can run normally //If the user is registered, then the application //jumps to the next step. if not(ActiveLock1.RegisteredUser) then begin //The Window title will display the UNREGISTERED USER Caption:='ActiveLock Example Application - Unregistered user'; //The Warning Form will be created and showed try Application.CreateForm(TfrmWarning,frmWarning); frmWarning.ShowModal; //Here we will destroy the object and free the associated //memory used by the frmWarning finally frmWarning.free; end; end //If the software is registered, the menu item EnterLiberationKey is //no more useful, so we can remove it. else EntertheLiberationKey1.Visible:=false; end;As we can see, since the application is started by the user, it makes a verification in the ActiveLock1 Component to know if the user is registered. If the user is registered, then the application goes to the last line, and the only thing that it does is to hide the menu item to go to the Enter Liberation form.
![]()
Now, if the user isn't registered, the application will create the frmWarning and the system will verify how many days left to the end of the evaluation time, if the user has days to use, then he/she'll be asked for what to do.
Taking a look at the component
When you drop the ActiveLock component to your form, you'll need to configure some features. To do this, right click in the ActiveLock1 component and choose Properties:
Now you'll need to choose a name to your application, in my case, I choose 'ActiveLock15Example'.
Click in Password and choose one. It's good choose a password with letters, numbers e symbols. You must keep this Password known only to yourself otherwise anyone who has the KeyGenerator would be able to crack every copy of your software.
Nelson Ferraz said:"The latest version of ActiveLock does not have a "Password" property, since I felt that it was very confusing. Instead, the software is identified solely by the SoftwareName."
Now click in the Code and Key length tab to set the LiberationKeyLenght and the SoftwareCodeLenght that will be generated by the component. I usually leave these values at the default settings (16-16 characters).
After settings, click in Apply button to the changes make effect, and click in OK button to close the properties window.
Important notes
Also do not use the same Software Name for different applications otherwise if a user has 2 or more of your software on his machine, the Liberation Keys for these software will work for one application only! This is very important, so take note. I discovered this through much testing.
Amongst the unzipped files is an application called KeyGenerator.exe which is needed to generate the correct LiberationKey which will be supplied to your users.What I did not realize for some time is that actually a different LiberationKey is generated for every computer. How does this come about? When users download your program from the Internet and run it on their computer, different sets of Software Code appear in different computers. If a user wants to purchase your software then he would have to tell you the Software Code that appears in the Registration Form. With this Software Code, the Password and LiberationKey length, you then use the KeyGenerator.exe to generate the LiberationKey for him i.e. when he has paid for the software." (from the Inter Netion tutorial 'How to use ActiveLock 1.5').
Now we can go to the Warning Form .