Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 301a36b002
Fetching contributors…

Cannot retrieve contributors at this time

executable file 67 lines (49 sloc) 1.178 kB
unit Calen;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Calendar, Buttons;
type
{ TfmCalen }
TfmCalen = class(TForm)
BitBtn1: TBitBtn;
bbOk: TBitBtn;
BitBtn3: TBitBtn;
Calendar1: TCalendar;
edTime: TEdit;
Label1: TLabel;
procedure bbOkClick(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
DateTimeValue: TDateTime;
{ public declarations }
end;
var
fmCalen: TfmCalen;
implementation
{ TfmCalen }
procedure TfmCalen.BitBtn1Click(Sender: TObject);
begin
edTime.Text:= TimeToStr(Time);
Calendar1.DateTime:= Date;
end;
procedure TfmCalen.FormActivate(Sender: TObject);
begin
edTime.Text:= TimeToStr(DateTimeValue);
Calendar1.DateTime:= DateTimeValue;
end;
procedure TfmCalen.FormCreate(Sender: TObject);
begin
end;
procedure TfmCalen.bbOkClick(Sender: TObject);
begin
DateTimeValue:= StrToTime(edTime.Text) + Trunc(Calendar1.DateTime);
end;
initialization
{$I calen.lrs}
end.
Jump to Line
Something went wrong with that request. Please try again.