Class TDateStamp (unit Dstamp)

Inherits from

TComponent

TDateStamp V1.1 is a simple component, which you may find useful for easy version stamping. It delivers the creation date, time and a VersionCount of your project. You have to set your version labels in the OnShow-Event to the DateStamp properties: procedure TForm1.FormShow(Sender: TObject); begin Label1.Caption:=DateStamp1.Date; Label2.Caption:=DateStamp1.Time; Label3.Caption:=IntToStr(DateStamp1.VersionCount); Label4.Caption:=DateStamp1.GetVersion; end; The Date and Time properties are updated every time you open the form (or the project). It's not the compile date but better than the date of the executable. The latter is user changeable! It's a slight overkill to use the PropertyEditor only for setting the properties readonly. You can remove it if you want, but you will not have the special VersionCount behaviour. This is a curious thing. The property VersionCount is only incremented when the form or unit was changed! and not when the project was opened or closed or saved without any changes. This is exactly what I need, but I don't know why it works in this way. (I think there are some optimisations in saving of properties within delphi (reason: ReadOnly-PropertyEditor) that working for me :-) history: V1.1: added Create-initialization, GetVersion, Version: string Please drop a short eMail to matthias@penthouse.boerde.de if you use it. I'm interested in how many people will implement it. freely distributable Public Domain Matthias Weingart, 12.12.95, matthias@penthouse.boerde.de

Constructors


constructor Create(AOwner: TComponent);

Protected-Deklarationen


Functions

function GetVersion: string;

Public-Deklarationen

procedure Loaded;


Properties

property Date : string


property Time : string


property Version : string

Published-Deklarationen

property VersionCount : longint


Events

Variables

FDate : string;

Private-Deklarationen

FTime : string;


FVersion : string;


FVersionCount : longint;



Constructors


constructor Create(AOwner: TComponent);

Protected-Deklarationen


Functions


function GetVersion: string;

Public-Deklarationen


procedure Loaded;


Properties


property Date : string


property Time : string


property Version : string

Published-Deklarationen


property VersionCount : longint


Events


Variables


FDate : string;

Private-Deklarationen


FTime : string;


FVersion : string;


FVersionCount : longint;