DelphiFAQ Home Search:
General :: Programming :: Delphi
General Delphi related information.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

A shareware nag example (for shareware developers)

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:

// From: Karsten Heitmann 
 
 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;

Generated 12:01:51 on Oct 20, 2017