Class TDateStamp (unit Dstamp) |
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 |
Functions |
Properties |
Events |
Variables |
Constructors |
Protected-Deklarationen
Functions |
Public-Deklarationen
Properties |
Published-Deklarationen
Events |
Variables |
Private-Deklarationen