TRegistration is Delphi component for use in Win32 and Win64 (XP/Vista/7/8/10) software.
A complete solution for shareware developers for handling the registered/unregistered state of applications and to automatically manage the registration process and database.
The package consists of a component to be used in applications to enter the registration details and query the state of the registration and the other part of the package is the Registration Tool, that let you manage the MySQL registration database and automatically process incoming order e-mails and send out registration details (comes with full source code).
The form that appears in the app.:
- Multiple projects can be managed
- The database system is designed for manual and/or automatic use
- Registering a user takes a couple of seconds or the built-in automatic registration processing functionality for share-it order e-mails can be used
- Automatic processing and sending of registration number and version code e-mails
- Customize global or per application reply e-mail templates
- Full unicode support
The Registration Tool program's snapshots:
- Delphi 2009
- Microsoft SQL Server 2008 R2 Express (or newer, Microsoft SQL Server 2017 Express also works fine)
- 3delite's Helper functions (included)
- Compiling the Registration Tool requires at least Delphi 2009.
TRegistration in shareware and commercial software?
The component is free for use in free software. If you like it and use it in a shareware or commercial product one of the licenses is needed.
If everything went smooth, you can access the TRegistration component on 3delite's tab.
- Unpack the package (TRegistration*.zip)
- Menu: 'File/New/Package Delphi'
- Helper3delite.pas is needed in the search path
- In project manager (in the upper-right corner by default), right-click on 'Package1.dproj' and select 'Add...'
- Unit file name: click 'Browse' and select 'RegistrationDefs.pas' and click 'Ok'
- Save the package with a name, eg. 'PackageTRegistration.dpk'
- In project manager (in the upper-right corner by default), right-click on 'PackageTRegistration.dproj' and select 'Build' then 'Install...'
Configuring the Registration Tool for MySQL server
Running the Registration Tool requires a valid database connection string (menu: 'Options/Settings...').
The only thing you have to take care of by default is the 'Data Source' property.
On Windows XP the '(local)' value seems working: 'Data Source=(local)' (this is the default).
On Windows 7 use 'ComputerName\SQLEXPRESS' value (change ComputerName to your computer name).
If you want to use a different MySQL server version, you'll probably have to adjust the 'SQLEXPRESS' connection string value to the one specified when installing the SQL server.
Upgrading from version 1.x
From version 2.0 Registration Tool uses MySQL database to store the registration information and requires Microsoft SQL Server 2008 R2 Express installed.
If everything went smooth the old (file based) database will be converted to a MySQL database.
- 1. Download and install Microsoft SQL Server 2008 R2 Express (or newer, Microsoft SQL Server 2017 Express also works fine)
- 2. Run the Registration Tool
- 3. Select menu: 'Options/Create New Database...'
- 4. Specify the options and click 'Create New Database'
- 5. Select menu: 'Options/Import V1.x Database...'
- 6. Specify the old 'Settings.ini' file in the old project folder and click 'Import'
Basic steps for using the Registration Tool
When running the Registration Tool for the first time, it will complain about not being able to connect to the MySQL server.
Adding a new registration user:
- 1. Set up the database connection string as described above.
- 2. Select menu: 'Options/Create New Database...' specify the options and select a file name (note: on Windows Vista and up use a file name for which you have rights to create). Click 'Create New Database'. Close the window.
- 3. On the main window click on 'Project Manager...', the project manager will come up.
- 4. Click on 'Add New Project...', specify the options, specify the registration seed that you use with TRegistration in your program, and create a new project. Fill in the 'download url' which will appear in the created registration number e-mail for the customers.
- 5. Select the newly created project and click 'Add New SubVersion...'. Specify the version code seed that you use with TRegistration in your program.
If you are using Share-It as your registration processing provider:
- 6. Go back to the main window, select the newly created project and select a sub version from the combo box.
- 7. Fill in the ("Registration Info") name and e-mail edit boxes and click on 'Add'. A new registration will be added to the selected project.
- 8. Click on lower 'Send E-mail' button to send the registration number to the user.
Sending out a version code:
- 6. Select all the e-mail contents that was sent by Share-It and copy it to the clipboard.
- 7. In the Registration Tool click on 'Add Share-It e-mail', the clipboard content will be processed and a new registration will be added to the selected project.
Automatic processing of share-it order e-mails:
- 1. When a user requests a new version code, identify the user by it's registration number (first 6 digits of the registration number is the users registration ID).
- 2. Make sure the correct sub version is selected. Look up the user and select the entry in the list.
- 3. Click on the upper 'Send E-mail' button to send the new version code number to the user.
- 1. Select menu: 'Options/Settings...' and setup incoming e-mail account and outgoing SMTP account. In share-it's control panel set to send order notification e-mails to this incoming e-mail address. 'Sender e-mail address' will appear as the sender of the registration number e-mail for the customers. 'Forwarding e-mail address' will be used to forward all incoming e-mails set for the incoming account and also for warning e-mails if there was an issue when processing the incoming order e-mail.
- 2. To enable automatic monitoring and processing of share-it order e-mails click on 'Close' button in the lower-right corner of the main window. The Registraiton Tool window will be minimized to tray and will start monitoring the incoming e-mail account.
- 3. To pause the automatic processing click on the tray icon, the main window will appear and the processing will be in a suspended state until you click 'Close' again.
- 4. Note: The project name must match the share-it product name, or at least must be a part of it, eg. if share-it product name is 'My project registration', project name must be 'My project'. The compare is not case sensitive.
- IniFileName: String: .ini's file name for loading/saving registration information.
If not specified it will be automatically guessed from .exe file's name changed extension to .ini.
- RandomSeedReg: Extended: Random seed number used when calculating a registration number (a random one is generated when you first put the component onto the form).
- RandomSeedVer: Extended: Random seed number used when calculating a version code (a random one is generated when you first put the component onto the form).
- RegEmail: String: Users e-mail for registration.
- RegistryKeyName: String: Registry key name for loading/saving registration information.
- RegistryRoot: Cardinal: default is HKEY_CURRENT_USER.
- RegName: String: Users name for registration.
- RegNumber: String: Users registration number for registration.
- RegVerCode: String: Users current version code for registration.
- SettingsStoreMode: TSettingsStoreMode: Set place for loading/saving registration information.
ssmIniFile: .ini file specified with IniFileName.
ssmRegistry: Registry place specified with RegistryRoot and RegistryKeyName
If not specified it will be automatically guessed from .exe's File Description and Company field.
- TextAppName: String: Application's name for registration text and for loading/saving registration information from/to the registry.
If not specified it will be automatically guessed from .exe's File Description field.
- TextAuthor: String: Application's author (company) for registration text and for loading/saving registration information from/to the registry.
If not specified it will be automatically guessed from .exe's Company field.
- TextOrderSite: String: Order site/company eg.: "www.shareit.com".
- TextPrice: String: Price of the product eg.: "$25".
- TextProductID: String: Product ID.
- URLOrderForm: String: URL to the application's order form (order TLabel click).
- URLRegistration: String: URL to the application's order information page ("Online" TButton).
- VerCodeUpdateEmailAddress: String: E-mail address where the version code request e-mails are sent.
- Registered: Boolean: Returns the registered/unregistered state.
Triggers: BeforeRegistrationCheck then OnRegistrationChecker then AfterRegistrationCheck.
- Load: Boolean: Load registration info (where specified with SettingsStoreMode).
- Save: Boolean: Save registration info (where specified with SettingsStoreMode).
- Show: Create and show the registration form (use this whenever you can - you also need probably to set FormStyle to fsStayOnTop as Windows hides the windows if you click on another one, and on the contrary the windows isn't shown on the taskbar).
- ShowModal: Integer: Create and show the registration form modaly (avoid using it, as this little window would stop your entire application in this case).
- AfterRegistrationCheck: Happens when the registration information's validity had been checked.
- AfterRegistrationLoad: Happens when the registration information had been loaded.
- AfterRegistrationSave: Happens when the registration information had been saved.
- BeforeRegistrationCheck: Happens when the registration information's validity is to be checked.
- BeforeRegistrationLoad: Happens when the registration information is to be loaded.
- BeforeRegistrationSave: Happens when the registration information is to be saved.
- OnDoRegistrationClick: Happens when the user clicks the "Register!" TButton on the registration form.
- OnNotEnoughInfoForReqVerCode: Happens when the user clicks the "Request!" TButton on the registration form but there is no registration information entered.
- OnRegistrationClickOrder: Happens when the user clicks the "order" TLabel (link) on the registration form. If you don't specify URLOrderForm, you can handle what to happen on click here.
- OnSendReqVerCode: Happens when the user clicks the "Request!" TButton on the registration form to request a version code.
- RegistrationChecker: You can implement your own registration information checker here (this will replace the built-in regnum/vernum calculator).
See the class's popup auto-complete menu while designing for all of it's properties/methodes...
Localizing the component
Copy the the form's files (RegForm.pas and RegForm.dfm) into your project folder.
Modify the controls as needed or use Delphi's built in translator system (Menu:Project/Languages/Add.. & Menu:View/Translation Manager) to translate the component.
Problems with floating point numbers
On other than english Windows operating system versions if you get an "Invalid floating point value" error adjust the 'Decimal symbol' in "Control Panel/Regional and Language Options/Regional Options/Customize/Decimal symbol" to "." (point).
Building the Registration Tool
The executable included in the package is built with Delphi 10.3 Rio, the needed SSL .dlls beside the RegistrationTool.exe are for Delphi 10.3 Rio. If you custom build Registration Tool with other Delphi version the according .dlls are needed beside the RegistrationTool.exe which are in 'C:\Program Files (x86)\Embarcadero\Studio\15.0\bin\subversion\' for example.