home *** CD-ROM | disk | FTP | other *** search
/ Prima Shareware 3 / DuCom_Prima-Shareware-3_cd1.bin / PROGRAMO / delphi / RTREGIST / DEMOS / PASCAL / PROJECT1.DPR next >
Encoding:
Text File  |  1996-04-13  |  1.2 KB  |  49 lines

  1. program Project1;
  2.  
  3. uses
  4.   Forms,
  5.   RtRegw32,
  6.   Dialogs,
  7.   SysUtils,
  8.   WinTypes,
  9.   Unit1 in 'UNIT1.PAS' {Form1},
  10.   Unit2 in 'UNIT2.PAS' {NewForm},
  11.   Unit3 in 'UNIT3.PAS' {NewForm1},
  12.   Unit4 in 'UNIT4.PAS' {NewForm2};
  13.  
  14. {$R *.RES}
  15.  
  16. var
  17.   Msg: string;
  18. begin
  19.   RTSetSaveFile('REGPAS.INI'); {Save information into REGPAS.INI}
  20.   RTSetSaveKind(skIni);        {it is an INI file}
  21.   Lock := 0;
  22.   Cnt := 1;
  23.   if RTCheckReg(cPrg)<0 then
  24.   begin
  25.     Msg := 'This an unregister version of the DEMO program.'+#13#10;
  26.      if RTIsCountLock(cPrg) then
  27.     begin
  28.       Lock := 1;
  29.       Cnt := RTCheckCountLock(cPrg);
  30.       Msg := Msg+'You have '+IntToStr(Cnt)+' more calls to test it.'+#13#10;
  31.     end
  32.     else if RTIsDateLock(cPrg) then
  33.     begin
  34.       Lock := 2;
  35.       Cnt := RTCheckDateLock(cPrg);
  36.       Msg := Msg+'You have '+IntToStr(Cnt)+' more days to test it.'+#13#10;
  37.     end;
  38.     Msg := Msg+'Do you want to register now?';
  39.        if ((MessageDlg(Msg,mtConfirmation,[mbYes,mbNo],0)=idNo) or (not Register))
  40.        and (Lock=0) then
  41.       SetLock;
  42.   end;
  43.   if Cnt>0 then
  44.   begin
  45.     Application.CreateForm(TForm1, Form1);
  46.   Application.Run;
  47.   end;
  48. end.
  49.