var
dlg: TForm;
dp: TDatePicker;
lbl1: TLabel;
lbl2: TLabel;
edt: TEdit;
btn: TBitBtn;
date: TDate;
checker: Boolean;
begin
dlg := TForm.Create(Application.MainForm);
try
dlg.BorderStyle := bsDialog;
dlg.Caption := _Form_AddBorrow;
dlg.FormStyle := fsStayOnTop;
dlg.Position := poOwnerFormCenter;
dlg.BorderIcons := [biSystemMenu];
lbl1 := TLabel.Create(dlg);
lbl1.Parent := dlg;
lbl1.Align := alTop;
lbl1.Alignment := taCenter;
lbl1.AlignWithMargins := True;
lbl1.Caption := '
Name';
edt := TEdit.Create(dlg);
edt.Parent := dlg;
edt.Align := alTop;
edt.AlignWithMargins :=true;
lbl2 := TLabel.Create(dlg);
lbl2.Parent := dlg;
lbl2.Align := alTop;
lbl2.Alignment := taCenter;
lbl2.AlignWithMargins := True;
lbl2.Caption := '
Choose Date';
dp := TDatePicker.Create(dlg);
dp.Parent := dlg;
dp.Align := alTop;
dp.AlignWithMargins := True;
btn := TBitBtn.Create(dlg);
btn.Parent := dlg;
btn.Align := alTop;
btn.Caption := _Button_AddBorrowOK;
btn.ModalResult := MrOk;
btn.Kind := bkOK;
btn.AlignWithMargins := True;
dlg.AutoSize := True;
checker := (btn.ModalResult = dlg.ShowModal);
date :=
dp.date;
finally
btn.Free;
dp.Free;
lbl1.Free;
edt.Free;
lbl2.Free;
dlg.Free;
end;