Posted: Fri Jul 06, 2007 8:58 pm Post subject: (*Adding Expiration date to your Application*Delphi*)
Code:
//Example Code
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}
//CreateForm
procedure TForm1.FormShow(Sender: TObject);
var
//Expire info(Used)
TheYear, TheMonth, TheDay : Integer;
begin
//The Info Goes Here
TheYear := 2001;
TheMonth := 12;
TheDay := 1;
{ Take the desired action below if the current
date is greater than the expiration date.
In this example, we close the application;
but you might also just disable buttons or
or other elements of the application. }
if (Date >= EncodeDate(TheYear, TheMonth, TheDay)) then
begin
ShowMessage('This application demo has expired.');
Close;
end;
end;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum