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;