To avoid this, you have to protect your software development on a variety of enemies, make the algorithm by which the program will be available to the user in its full mode until it enters the registration code, for which he will pay you and.
Create a new form in a visual programming environment in which there are two input fields and one button. The first input field will be entered the serial number of copies of the program, and in the second - the registration code (or key). The button will be used to confirm the data entry. For convenience, place the two fields one below the other are aligned on the left edge of the form and its middle position and the button on the center right.
To Apply button attribute Caption = "Register" to the first entry field - Caption = "Your serial number" for the second field - Caption = "Enter registration code".
Make it so that each computer had its own unique serial number and a registration key to it, which will be generated strictly by clearly defined formula. To do so the first time you run the serial number of randomly generated (RND) and recorded in a hidden file, but rather in the registry.
Now make sure that the key to the serial number was calculated program of strict formula (for example, key = serial number 5/333 * +4). It is the value obtained by the program will be required to enter it to unlock.