procedure TForm1.ToolButton1Click(Sender: TObject);
begin
Show_Backup;
end;
上面是调用,下面是定义
public
{ Public declarations }
end;
function Show_Backup: Boolean;
function Show_Restore: Boolean;
implementation
uses DM;
{$R *.DFM}
function Show_Backup: Boolean;
begin
with Tfrm_data.Create(Application) do
begin
Caption := '数据备份';
lbl_Caption.Caption := '备份路径:';
Edt_FileName.Text := FormatdateTime('yyyy-mm-dd', now) + '.dat';
FOK := False;
try
Showmodal;
finally
Result := FOK;
free;
end;
end;
end;
我是引用别人的不知道能不能帮你!