DelphiFAQ Home Search:

A shareware nag example (for shareware developers)

 

commentsThis 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:

// 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;

Comments:

2008-01-24, 07:11:14
anonymous from United Kingdom  
arghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!
this is my homework

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: