动态创建的form里有 TDateTimePicker
退出form 后如何得到DateTimePicker.date
退出form 后如何得到DateTimePicker.date
解决方案 »
- 因没装驱动,delphi连接ACCESS2007时出错如何返回消息?
- Delphi怎么读出一段字节数值中的几个字节的十进制值
- 一点点成就感,分享一下:从内存中加载并启动一个exe
- delphi最终群 ..群的人多是你的加入..群的强大是你的支持..欢迎你的指教..
- 是否继续当中型软件公司做程序员还是到小公司独当一面?
- 我原来用的是InterBase4.2,现在想换成InterBase7.0,可以用吗,会不会有问题?
- 请问高手:BOLB has been Modifiedm,这样的错误原因是什么,如何处理
- 各位大侠。。。。有没有人知道怎么在Oracle数据库中控制每次用Select语句去记录只取一条
- 請您給個高見!!!
- 如何得到一串文字(无论英文中文)的Ascii码?原代码谢谢!
- 菜鸟请教:怎么安装组件包?问题解决马上给分
- 怎样在子窗口中使用数据库控件?
function inFind(const ACaption, APrompt,ADateLabel:string;var Value:String;FDate,TDate:TDateTime):Boolean;
var FindForm:TForm;
Edit:TEdit;
Prompt,DateLabel: TLabel;
DateF,DateT:TDateTimePicker;
begin
Result := False;
FindForm := TForm.Create(Application);
with FindForm do
try
Left := 202;
Top := 374;
Width := 295;
Height := 186;
Font.Charset := GB2312_CHARSET;
Font.Name := '宋体';
Font.Size :=9;
Canvas.Font := Font;
BorderStyle := bsDialog;
Caption := ACaption;
Position := poScreenCenter; Prompt := TLabel.Create(FindForm);
with Prompt do
begin
Parent := FindForm;
Caption := APrompt;
Left := 24;
Top := 16;
Width := 96;
Height := 12;
WordWrap := True;
end; DateLabel:= TLabel.Create(FindForm);
with DateLabel do
begin
Parent := FindForm;
Caption := ADateLabel;
Left := 24;
Top := 61;
Width := 108;
Height := 12;
WordWrap := True;
end; Edit := TEdit.Create(FindForm);
with Edit do
begin
Parent := FindForm;
Left := 24;
Top := 33;
Width := 241;
Height := 20;
MaxLength := 255;
Text := Value;
SelectAll;
end; DateF:=TDateTimePicker.Create(FindForm);
with DateF do
begin
Parent := FindForm;
Left := 25;
Top := 79;
Width := 110;
Height := 20;
Date :=now;
DateMode := dmUpDown; end; DateT:=TDateTimePicker.Create(FindForm);
with DateT do
begin
Parent := FindForm;
Left := 150;
Top := 79;
Width := 117;
Height := 20;
Date := now;
DateMode := dmUpDown;
end; with TButton.Create(FindForm) do
begin
Parent := FindForm;
Caption := '确定';
ModalResult := mrOk;
Default := True;
Left := 73;
Top := 115;
Width := 75;
Height := 25;
end; with TButton.Create(FindForm) do
begin
Parent := FindForm;
Caption := '取消';
ModalResult := mrCancel;
Cancel := True;
Left := 153;
Top := 115;
Width := 75;
Height := 25;
end;
if ShowModal = mrOk then
begin
Value := Edit.Text;
FDate:= DateF.Date;
TDate:= DateT.Date;
Result := True;
end;
finally
FindForm.Free;
end;
end;
TDate:= DateT.Date;
这不是已经访问了吗?
你想问什么啊?