0

I want to use OnGuard to lock my program after 1 day unless you enter an activation key specific to your computer. I would like to change the start date and end date of ogdatecode. For StartDate I need the first time the app has run on this computer ever, and the end date would after one day. After expiration, I need a form to open where you have to enter an activation code specific to your computer.

procedure TMainMenuForm.OgDateCode1GetKey(Sender: TObject; var Key: TKey);
begin
  Key := CKey;
end;

procedure TMainMenuForm.OgDateCode1Checked(Sender: TObject;
  Status: TCodeStatus);
begin

 case Status of
  ogValidCode: Showmessage ('------ Valid Code ------' +#13+#13+'      Until : 19/08/2021 ' +#13+#13+'               Reste' +#13+#13+'                  '+ #13+#13+ '                days'+#13+#13+ '------------------------');
  ogInvalidCode: Showmessage ('áÇ íãßä ááÈÑäÇãÌ Ãä íÚãá Ýí åÐÇ ÇáÊÇÑíÎ');
  ogPastEndDate: Showmessage ('ÊÇÑíÎ ÕáÇÍíÉ ÇáÈÑäÇãÌ ÇäÊåÊ .. ÅÊÕá ÈÇáãÈÑãÌ');
  end;

 if Status <> ogValidCode then
 begin
  Showmessage ('äÃÓÝ .. ÓíÊã ÛáÞ ÇáÈÑäÇãÌ');
  Application.Terminate;
 end;
end;
1
  • This is all covered in the documentation for OnGuard, which is still available in PDF format from the same place you got OnGuard.
    – Ken White
    Sep 30 at 20:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.