Programming C# C++ (7) Delphi (617) .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280) Java (8) JavaScript (31) perl (9) php (4) VBScript (1) Visual Basic (1)
Exchange Links About this site Links to us 
|
A shareware nag example (for shareware developers)
This article has not been rated yet. After reading, feel free to leave comments and rate it.
This here little piece of code GOT to be the quickest way to create a true shareware nag,
that gives people the full functionality of the program, yet nags people big time untill they register (cruel, huh :) )
This shareware nag makes sure that the user can only execute your program once every Windows session.
In your FormShow event:
 | |  | |
procedure TForm1.FormShow (Sender: TObject);
var
atom : integer;
CRLF : string;
begin
if GlobalFindAtom ('THISISSOMEOBSCUREETEXT') = 0 then
atom := GlobalAddAtom ('THISISSOMEOBSCUREETEXT')
else
begin
CRLF := #10#13;
ShowMessage ('This version may only be run once every Windows Session.'
+ CRLF +
'To run this application again, you need to restart Windows,'
+ CRLF + 'or purchase a license.!!');
Close
end
end; | |  | |  |
Comments:
|
anonymous from United Kingdom
|
|
|
|
arghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!
this is my homework
|
|