本文整理自网络,侵删。
//创建一个文本文件
procedure TFrmAutomatismBalance.FlatButton3Click(Sender: TObject);
var
TF:TextFile; PathStr:string;
begin
PathStr:=ExtractFilePath(Application.ExeName)+FormatDateTime('yyyy-mm-dd',Now())+'.txt' ; AssignFile(Tf,PathStr); ReWrite(Tf); CloseFile(Tf);
end;
//往文本文件里面写入数据
procedure TFrmAutomatismBalance.FlatButton3Click(Sender: TObject);
var TF:TextFile; PathStr:string;
begin
PathStr:=ExtractFilePath(Application.ExeName) +FormatDateTime('yyyy-mm-dd',Now())+'.txt' ; AssignFile(Tf,PathStr); Append(Tf); WriteLn(Tf,'Creat A TXT'); Flush(Tf); CloseFile(Tf);
end;
相关阅读 >>
Delphi socket connect timeout 套字节链接超时设置
Delphi xe5也可以开发 google glass应用
Delphi关于tjpegimage的使用(bmp\ jpg格式转换)
更多相关阅读请进入《Delphi》频道 >>