unit Unit1;
interface
uses
Windows, SysUtils, Classes, Forms, Dialogs;
type
TForm1 = class(TForm)
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormShow(Sender: TObject);
var
TheYear, TheMonth, TheDay : Integer;
begin
TheYear := 2001;
TheMonth := 12;
TheDay := 1;
if (Date >= EncodeDate(TheYear, TheMonth, TheDay)) then
begin
ShowMessage('This application demo has expired.');
Close;
end;
end;
end.